Beispiel #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();
 }
Beispiel #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;
        }
Beispiel #3
0
 private string ConstructDefaultStorageDir(string groupName, string storageType)
 {
     return(Utils.CombinePathNullSafe(this.DefaultStorageBaseDir, string.Format("{0}\\Storage\\{1}", groupName, storageType)));
 }
Beispiel #4
0
 internal string GetGroupMemberConfigKeyName(string groupName, string memberName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupMembersContainerKeyName(groupName), memberName));
 }
Beispiel #5
0
 internal string GetGroupSettingsKeyName(string groupName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupConfigKeyName(groupName), "Settings"));
 }
Beispiel #6
0
 internal string GetGroupConfigKeyName(string groupName)
 {
     return(Utils.CombinePathNullSafe(this.GetGroupsContainerKeyName(), groupName));
 }
Beispiel #7
0
 internal string GetGroupsContainerKeyName()
 {
     return(Utils.CombinePathNullSafe(this.ManagerConfigKeyName, "Groups"));
 }
Beispiel #8
0
 internal string GetManagerSettingsKeyName()
 {
     return(Utils.CombinePathNullSafe(this.ManagerConfigKeyName, "Settings"));
 }