Reset() 정적인 개인적인 메소드

static private Reset ( ) : void
리턴 void
        internal static void ApplyChanges(ContentType settings)
        {
            SchemaEditor editor = new SchemaEditor();

            editor.Load();
            ApplyChangesInEditor(settings, editor);
            editor.Register();

            // The ContentTypeManager distributes its reset, no custom DistributedAction call needed
            ContentTypeManager.Reset();
        }
예제 #2
0
        internal static void ApplyChanges(ContentType settings, bool reset)
        {
            SchemaEditor editor = new SchemaEditor();

            editor.Load();
            ApplyChangesInEditor(settings, editor);
            editor.Register();

            // The ContentTypeManager distributes its reset, no custom DistributedAction call needed
            if (reset)
            {
                ContentTypeManager.Reset(); // necessary (ApplyChanges) calls ContentType.Save
            }
        }
        internal void RemoveContentType(string name)
        {
            // Caller: ContentType.Delete()
            lock (_syncRoot)
            {
                ContentType contentType;
                if (_contentTypes.TryGetValue(name, out contentType))
                {
                    SchemaEditor editor = new SchemaEditor();
                    editor.Load();
                    RemoveContentType(contentType, editor);
                    editor.Register();

                    // The ContentTypeManager distributes its reset, no custom DistributedAction call needed
                    ContentTypeManager.Reset();
                }
            }
        }
예제 #4
0
        public void ExecuteBatch()
        {
            //-- Install considering dependencies

            if (_contentTypeCTD != null)
            {
                Install(_contentTypeCTD);
            }

            List <CTD>  docList = new List <CTD>(_docs.Values);
            Stack <CTD> stack   = new Stack <CTD>();
            CTD         parent  = null;

            while (docList.Count > 0)
            {
                CTD doc = parent ?? docList[0];
                docList.Remove(doc);
                _docs.Remove(doc.Name);
                if (_docs.ContainsKey(doc.ParentName))
                {
                    stack.Push(doc);
                    parent = _docs[doc.ParentName];
                }
                else
                {
                    Install(doc);
                    while (stack.Count > 0)
                    {
                        Install(stack.Pop());
                    }
                    parent = null;
                }
            }
            _editor.Register();

            // The ContentTypeManager distributes its reset, no custom DistributedAction call needed
            ContentTypeManager.Reset();
        }
예제 #5
0
 public static void RemoveContentType(ContentType contentType)
 {
     contentType.Delete();
     // The ContentTypeManager distributes its reset, no custom DistributedAction call needed
     ContentTypeManager.Reset();
 }