コード例 #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);
        }
コード例 #2
0
        public IComponentControl GetOrCreateChildFolderControl(GetOrCreateFolderData data)
        {
            var type          = Client.GetFolderComponentTypeControl();
            var componentData = new GetOrCreateComponentData(data.SystemName, type)
            {
                DisplayName = data.DisplayName,
                Version     = null
            };

            componentData.Properties.CopyFrom(data.Properties);
            return(GetOrCreateChildComponentControl(componentData));
        }
コード例 #3
0
 public GetOrCreateComponentResponse GetOrCreateChildFolder(GetOrCreateFolderData data)
 {
     return(ResponseHelper.GetOfflineResponse <GetOrCreateComponentResponse>());
 }
コード例 #4
0
 public IComponentControl GetOrCreateChildFolderControl(GetOrCreateFolderData data)
 {
     return(new FakeComponentControl());
 }
コード例 #5
0
        public IComponentControl GetOrCreateChildFolderControl(string systemName)
        {
            var createData = new GetOrCreateFolderData(systemName);

            return(GetOrCreateChildFolderControl(createData));
        }