Exemple #1
0
 protected Domain(DomainInfo domainInfo, CremaDispatcher dispatcher)
 {
     this.dispatcher = dispatcher;
     this.Initialize(domainInfo); ;
     this.Name = domainInfo.DomainID.ToString();
     this.users = new DomainUserCollection(this);
 }
Exemple #2
0
        protected Domain(SerializationInfo info, StreamingContext context)
        {
            var cremaHost  = context.Context as CremaHost;
            var domainInfo = (DomainInfo)info.GetValue(typeof(DomainInfo).Name, typeof(DomainInfo));

            this.Initialize(domainInfo);
            this.Name = base.DomainInfo.DomainID.ToString();
            this.data = (byte[])info.GetValue(dataKey, typeof(byte[]));
            this.DerializeSource(this.data);
            this.users = new DomainUserCollection(this);
            this.InitializeUsers(info);
        }
Exemple #3
0
        protected Domain(string creatorID, Guid dataBaseID, string itemPath, string itemType)
        {
            var signatureDate = new SignatureDate(creatorID, DateTime.UtcNow);
            var domainInfo    = new DomainInfo()
            {
                DomainID         = Guid.NewGuid(),
                CreationInfo     = signatureDate,
                ModificationInfo = signatureDate,
                DataBaseID       = dataBaseID,
                ItemPath         = itemPath,
                ItemType         = itemType,
                DomainType       = this.GetType().Name,
            };

            this.Initialize(domainInfo);
            base.DomainState = DomainState.IsActivated;
            this.Name        = base.DomainInfo.DomainID.ToString();
            this.users       = new DomainUserCollection(this);
        }