public IDataResult <IStageComponent> GetComponent(DrawFileComponentType type) { ComponentValidator componentValidator = new ComponentValidator(); IResult result = componentValidator.ValidateComponent(type); IDataResult <IStageComponent> dataResult = result as IDataResult <IStageComponent>; if (result.Success) { switch (type) { case DrawFileComponentType.Stage: IStageComponent stage = new StageComponent(); stage.SubComponents = new System.Collections.Generic.List <IStageComponent>(); break; case DrawFileComponentType.SubStage: break; case DrawFileComponentType.Team: break; case DrawFileComponentType.Topic: break; } } //DataResult<IStageComponent> dataResult = new DataResult<IStageComponent>(); //IStageComponent stage = new StageComponent(); //IFileData fileData = new FileData(); //fileData.CurrentComponent = new MemoryStream(); //stage.CurrentComponentFileData = fileData; //dataResult.Data = stage; return(dataResult); }
public IResult ValidateComponent(DrawFileComponentType type) { ComponentValidator valid = new ComponentValidator(); return(valid.ValidateComponent(type)); }