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