Esempio n. 1
0
        public static ComponentControlWrapper CreateFolder(
            ComponentControlWrapper parent,
            GetOrCreateFolderData getOrCreateFolder)
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }
            if (getOrCreateFolder == null)
            {
                throw new ArgumentNullException("getOrCreateFolder");
            }

            var folderType = parent.Client.GetFolderComponentTypeControl();
            var getOrCreateComponentData = new GetOrCreateComponentData(getOrCreateFolder.SystemName, folderType)
            {
                DisplayName = getOrCreateFolder.DisplayName,
                Version     = null
            };


            var controlData = new GetOrCreateComponentControlData(parent, getOrCreateComponentData);

            var wrapper = new ComponentControlWrapper(
                controlData.Parent.ClientInternal,
                controlData.Data.ComponentTypeControl);

            wrapper.GetOrCreateComponentData = controlData;

            wrapper.ControlActivator = new ControlActivator <IComponentControl>(
                wrapper.CreateFolderOnline,
                wrapper.CreateFolderOffline);

            return(wrapper);
        }
Esempio n. 2
0
        internal override IComponentControl GetOrCreateChildComponentControl(GetOrCreateComponentControlData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }
            lock (this)
            {
                var wrapper = new ComponentControlWrapper(data.Parent.ClientInternal, data.Data.ComponentTypeControl);
                wrapper.GetOrCreateComponentData = data;

                wrapper.ControlActivator = new ControlActivator <IComponentControl>(
                    wrapper.CreateComponentOnline,
                    wrapper.CreateComponentOffline);

                return(wrapper);
            }
        }
Esempio n. 3
0
        public override IComponentControl GetOrCreateChildComponentControl(GetOrCreateComponentData data)
        {
            var controlData = new GetOrCreateComponentControlData(this, data);

            return(GetOrCreateChildComponentControl(controlData));
        }
 internal override IComponentControl GetOrCreateChildComponentControl(GetOrCreateComponentControlData data)
 {
     // данный метод вызывается только у wrapper-а
     throw new NotImplementedException();
 }
Esempio n. 5
0
 internal abstract IComponentControl GetOrCreateChildComponentControl(GetOrCreateComponentControlData data);