mirror of
https://github.com/esiur/esiur-dart.git
synced 2026-04-03 17:58:21 +00:00
null-safety
This commit is contained in:
@@ -27,27 +27,20 @@ import 'AuthenticationMethod.dart';
|
||||
import 'AuthenticationType.dart';
|
||||
import 'Source.dart';
|
||||
|
||||
class Authentication
|
||||
{
|
||||
|
||||
int tokenIndex;
|
||||
AuthenticationMethod method;
|
||||
class Authentication {
|
||||
int? tokenIndex;
|
||||
AuthenticationMethod method = AuthenticationMethod.None;
|
||||
|
||||
String username;
|
||||
//Certificate certificate;
|
||||
String domain;
|
||||
String? username;
|
||||
//Certificate certificate;
|
||||
String? domain;
|
||||
|
||||
String get fullName => username + "@" + domain;
|
||||
int state;
|
||||
String get fullName => (username ?? '') + '@' + (domain ?? '');
|
||||
int state = 0;
|
||||
|
||||
Source source = new Source();
|
||||
Source? source;
|
||||
|
||||
|
||||
final AuthenticationType type;
|
||||
final AuthenticationType type;
|
||||
|
||||
Authentication(this.type)
|
||||
{
|
||||
|
||||
}
|
||||
Authentication(this.type) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class Session
|
||||
Authentication get remoteAuthentication => _remoteAuth;
|
||||
|
||||
// public Source Source { get; }
|
||||
DC id;
|
||||
DC? id;
|
||||
|
||||
//DateTime get creation => _creation;
|
||||
|
||||
@@ -45,10 +45,8 @@ class Session
|
||||
Authentication _localAuth, _remoteAuth;
|
||||
|
||||
|
||||
Session(Authentication localAuthentication, Authentication remoteAuthentication)
|
||||
Session(this._localAuth, this._remoteAuth)
|
||||
{
|
||||
|
||||
this._localAuth = localAuthentication;
|
||||
this._remoteAuth = remoteAuthentication;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,22 +25,12 @@ SOFTWARE.
|
||||
import '../../Data/KeyList.dart';
|
||||
import 'SourceAttributeType.dart';
|
||||
|
||||
class Source
|
||||
{
|
||||
class Source {
|
||||
//string id;
|
||||
String id;
|
||||
|
||||
//string id;
|
||||
String id;
|
||||
|
||||
KeyList<SourceAttributeType, dynamic> attributes;
|
||||
|
||||
Source.from(this.id, this.attributes)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Source()
|
||||
{
|
||||
attributes = new KeyList<SourceAttributeType, dynamic>();
|
||||
}
|
||||
KeyList<SourceAttributeType, dynamic> attributes =
|
||||
new KeyList<SourceAttributeType, dynamic>();
|
||||
|
||||
Source.from(this.id, this.attributes) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user