Exemplo n.º 1
0
        /// <summary>
        /// Open the connection to the store
        /// </summary>
        public void Open()
        {
            if (Instance != null)
            {
                throw new AzException("The store is already open.");
            }

            if (ConnectionString.StartsWith("msxml"))
            {
                Xml.XmlService f = new Xml.XmlService(ConnectionString.Substring(8));
                Locator.SetService(f, new Xml.XmlFactory(f));

                Instance = f.GetAdminManager();
            }
            else if (ConnectionString.StartsWith("msldap"))
            {
                ActiveDirectory.AdService s = new ActiveDirectory.AdService(ConnectionString.Substring(9));
                Locator.SetService(s, new ActiveDirectory.AdFactory(s));

                Instance = s.GetAdminManager();
            }
            else
            {
                throw new AzException("Unsupported connectionstring specified.");
            }

            Instance.Groups.Store = this;
            Instance.Applications.AdminManager = this;
        }
Exemplo n.º 2
0
 public AdFactory(AdService service)
 {
     _Service = service;
 }
Exemplo n.º 3
0
        public AdBaseObject()
        {
            Service = (AdService)Locator.Service;

            Changes = new Dictionary <string, ChangeType>();
        }