Пример #1
0
 public void Initialize(string componentName, string self = null, string baseComponentKeyName = null, IDxStoreEventLogger eventLogger = null, bool isZeroboxMode = false)
 {
     this.componentName = componentName;
     this.Self          = ((!string.IsNullOrEmpty(self)) ? self : Environment.MachineName);
     this.isZeroboxMode = isZeroboxMode;
     if (string.IsNullOrEmpty(this.DefaultStorageBaseDir))
     {
         this.DefaultStorageBaseDir = Utils.CombinePathNullSafe(isZeroboxMode ? "C:\\Exchange" : ExchangeSetupContext.InstallPath, string.Format("DxStore\\Database\\{0}", this.componentName));
         if (isZeroboxMode)
         {
             this.DefaultStorageBaseDir = this.DefaultStorageBaseDir + "\\ZeroBox\\" + this.Self;
         }
     }
     if (string.IsNullOrEmpty(baseComponentKeyName))
     {
         baseComponentKeyName = string.Format("SOFTWARE\\Microsoft\\ExchangeServer\\{0}\\DxStore\\{1}", "v15", this.componentName);
         if (isZeroboxMode)
         {
             baseComponentKeyName = baseComponentKeyName + "\\Zerobox\\" + this.Self;
         }
     }
     this.eventLogger          = eventLogger;
     this.ManagerConfigKeyName = baseComponentKeyName;
     this.ManagerConfig        = this.GetManagerConfig();
 }
Пример #2
0
        public void Initialize(string fullKeyName, bool isPrivate = false, string self = null)
        {
            string path = isPrivate ? "Private" : "Public";

            this.FullKeyName   = Utils.CombinePathNullSafe(path, fullKeyName);
            base.Requester     = ((!string.IsNullOrEmpty(self)) ? self : Environment.MachineName);
            base.ProcessInfo   = Utils.CurrentProcessInfo;
            base.TimeRequested = DateTimeOffset.Now;
            base.Id            = Guid.NewGuid();
            base.Version       = 1;
        }
Пример #3
0
 private string ConstructDefaultStorageDir(string groupName, string storageType)
 {
     return(Utils.CombinePathNullSafe(this.DefaultStorageBaseDir, string.Format("{0}\\Storage\\{1}", groupName, storageType)));
 }
Пример #4
0
 internal string GetGroupMemberConfigKeyName(string groupName, string memberName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupMembersContainerKeyName(groupName), memberName));
 }
Пример #5
0
 internal string GetGroupSettingsKeyName(string groupName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupConfigKeyName(groupName), "Settings"));
 }
Пример #6
0
 internal string GetGroupConfigKeyName(string groupName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupsContainerKeyName(), groupName));
 }
Пример #7
0
 internal string GetGroupsContainerKeyName()
 {
     return(Utils.CombinePathNullSafe(this.ManagerConfigKeyName, "Groups"));
 }
Пример #8
0
 internal string GetManagerSettingsKeyName()
 {
     return(Utils.CombinePathNullSafe(this.ManagerConfigKeyName, "Settings"));
 }