Ejemplo n.º 1
0
        protected override void InternalValidate()
        {
            base.InternalValidate();
            if (!this.Identity.IsUnique())
            {
                base.WriteError(new NonUniqueEventCategoryInputException(), ErrorCategory.InvalidData, this.Identity);
            }
            ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(null, true, ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 148, "InternalValidate", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\EventLog\\SetEventLogLevel.cs");
            EventCategoryIdentity         eventCategoryIdentity        = null;

            if (this.Identity.ToString() != null)
            {
                eventCategoryIdentity = EventCategoryIdentity.Parse(this.Identity.ToString());
            }
            Server obj;

            if (eventCategoryIdentity == null || string.IsNullOrEmpty(eventCategoryIdentity.Server))
            {
                obj = topologyConfigurationSession.FindLocalServer();
            }
            else
            {
                ServerIdParameter serverIdParameter = ServerIdParameter.Parse(eventCategoryIdentity.Server);
                obj = (Server)base.GetDataObject <Server>(serverIdParameter, topologyConfigurationSession, null, null, new LocalizedString?(Strings.ErrorServerNotUnique(serverIdParameter.ToString())), new LocalizedString?(Strings.ErrorServerNotFound(serverIdParameter.ToString())));
            }
            ADSessionSettings sessionSettings = ADSessionSettings.FromCustomScopeSet(base.ScopeSet, ADSystemConfigurationSession.GetRootOrgContainerIdForLocalForest(), base.CurrentOrganizationId, base.ExecutingUserOrganizationId, true);

            MapiTaskHelper.VerifyIsWithinConfigWriteScope(sessionSettings, obj, new Task.ErrorLoggerDelegate(base.ThrowTerminatingError));
        }
Ejemplo n.º 2
0
 public static ECIdParameter Parse(string input)
 {
     return(new ECIdParameter(EventCategoryIdentity.Parse(input)));
 }