Beispiel #1
0
        public RemoteParty(CountryCode CountryCode,
                           Party_Id PartyId,
                           Roles Role,
                           BusinessDetails BusinessDetails,

                           IEnumerable <AccessInfo2> AccessInfos,
                           IEnumerable <RemoteAccessInfo> RemoteAccessInfos,

                           PartyStatus Status   = PartyStatus.ENABLED,
                           DateTime?LastUpdated = null)

        {
            this.Id = RemoteParty_Id.Parse(
                String.Concat(CountryCode.ToString(),
                              "-",
                              PartyId.ToString(),
                              "_",
                              Role.ToString()));

            this.CountryCode     = CountryCode;
            this.PartyId         = PartyId;
            this.Role            = Role;
            this.BusinessDetails = BusinessDetails;
            this.Status          = Status;
            this.LastUpdated     = LastUpdated ?? DateTime.UtcNow;

            this._AccessInfo        = AccessInfos.IsNeitherNullNorEmpty() ? new List <AccessInfo2>     (AccessInfos)       : new List <AccessInfo2>();
            this._RemoteAccessInfos = RemoteAccessInfos.IsNeitherNullNorEmpty() ? new List <RemoteAccessInfo>(RemoteAccessInfos) : new List <RemoteAccessInfo>();

            CalcSHA256Hash();
        }