Microsoft.ManagementConsole.Node.Initialize C# (CSharp) Méthode

Initialize() private méthode

private Initialize ( NodeData data ) : void
data Microsoft.ManagementConsole.Internal.NodeData
Résultat void
        internal void Initialize(NodeData data)
        {
            this.Data = data;
            this._snapIn = SnapInBase.SnapInInstance as NamespaceSnapInBase;
            if (this._snapIn == null)
            {
                throw new Exception(Microsoft.ManagementConsole.Internal.Utility.FormatResourceString(Microsoft.ManagementConsole.Internal.Strings.ExceptionCommonWrongThread, new object[] { "Node" }));
            }
            if (_idCounter == 0x7fffffff)
            {
                TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Error, 12, "The max value for Node identifiers has been reached; no new nodes can be created.");
                throw new Exception(Microsoft.ManagementConsole.Internal.Utility.LoadResourceString(Microsoft.ManagementConsole.Internal.Strings.ExceptionMMCOutOfResources));
            }
            this.Data.Id = Interlocked.Increment(ref _idCounter);
        }