Example #1
0
        public void Load()
        {
            try
            {
                using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\AdminTools", false))
                {
                    if (registryKey != null)
                    {
                        this.serializedSettings = (registryKey.GetValue(NodeStructureSettingsStore.NodeStructureSettings) as byte[]);
                        if (this.serializedSettings != null)
                        {
                            NodeStructureSettingsStore nodeStructureSettingsStore = WinformsHelper.DeSerialize(this.serializedSettings) as NodeStructureSettingsStore;
                            if (nodeStructureSettingsStore.settings != null)
                            {
                                if ((from c in nodeStructureSettingsStore.settings
                                     where c.State == NodeStructureSettingState.Used
                                     select c).Count <NodeStructureSetting>() <= (from c in this.slots
                                                                                  where c.Version == NodeStructureSettingsStore.DominantVersion
                                                                                  select c).Count <Slot>())
                                {
                                    using (IEnumerator <NodeStructureSetting> enumerator = nodeStructureSettingsStore.settings.GetEnumerator())
                                    {
                                        while (enumerator.MoveNext())
                                        {
                                            NodeStructureSetting nodeStructureSetting = enumerator.Current;
                                            if (nodeStructureSetting.State == NodeStructureSettingState.Used)
                                            {
                                                this.organizationSettings.Add(new OrganizationSetting
                                                {
                                                    CredentialKey = nodeStructureSetting.CredentialKey,
                                                    DisplayName   = nodeStructureSetting.DisplayName,
                                                    LogonWithDefaultCredential = nodeStructureSetting.LogonWithDefaultCredential,
                                                    Type = nodeStructureSetting.Type,
                                                    Uri  = nodeStructureSetting.Uri,
                                                    SupportedVersionList = new SupportedVersionList(NodeStructureSettingsStore.DominantVersion)
                                                });
                                            }
                                        }
                                        goto IL_172;
                                    }
                                }
                            }
                            this.organizationSettings = (nodeStructureSettingsStore.organizationSettings ?? new List <OrganizationSetting>());
                            this.recentServerUris     = (nodeStructureSettingsStore.recentServerUris ?? new List <Uri>());
IL_172:
                            this.LocalOnPremiseRemotePSServer = nodeStructureSettingsStore.LocalOnPremiseRemotePSServer;
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Example #2
0
 public override void PrimaryExecute(string key, CommunicationChannelCollection channels, NodeStructureSettingsStore store, SyncQueue syncQueue)
 {
     syncQueue.AcKnowledge(this.AcknowledgedId);
 }
 public sealed override void PrimaryExecute(string key, CommunicationChannelCollection channels, NodeStructureSettingsStore store, SyncQueue syncQueue)
 {
     channels[key].Channel.SetData(WinformsHelper.Serialize(this));
 }
Example #4
0
 public abstract void PrimaryExecute(string key, CommunicationChannelCollection channels, NodeStructureSettingsStore store, SyncQueue syncQueue);