2
0
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:
2021-07-24 13:12:43 +03:00
parent 6be04c39ed
commit 614c6853e3
48 changed files with 3022 additions and 3320 deletions

View File

@@ -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) {}
}

View File

@@ -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;
}
}

View File

@@ -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) {}
}