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); }
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)); }
public GetOrCreateComponentResponse GetOrCreateChildFolder(GetOrCreateFolderData data) { return(ResponseHelper.GetOfflineResponse <GetOrCreateComponentResponse>()); }
public IComponentControl GetOrCreateChildFolderControl(GetOrCreateFolderData data) { return(new FakeComponentControl()); }
public IComponentControl GetOrCreateChildFolderControl(string systemName) { var createData = new GetOrCreateFolderData(systemName); return(GetOrCreateChildFolderControl(createData)); }