public IResult ValidateComponent(DrawFileComponentType type) { //???? string name = @"Game\"; string tempPath = Path.GetTempPath(); string path = tempPath + name; //???? IResult result = new Result() { Success = true, Message = "" }; GameStageConfigSection entity = ConfigurationHolder.ApiConfiguration; ValidataArchive validataArchive = new ValidataArchive(entity); switch (type) { case DrawFileComponentType.Stage: IResult resultStage = validataArchive.Stage(path); result.Message = resultStage.Message; break; case DrawFileComponentType.SubStage: IResult resultSubFiles = validataArchive.SubStageFile(path); result.Message = resultSubFiles.Message; break; case DrawFileComponentType.Team: IResult resultSubItemFiles = validataArchive.QuestionFile(path); result.Message = resultSubItemFiles.Message; break; case DrawFileComponentType.Topic: IResult resultQuestionFiles = validataArchive.QuestionTopicFile(path); result.Message = resultQuestionFiles.Message; break; } return(result); }
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 IDataResult <IStageComponent> GetComponent(DrawFileComponentType type) { throw new System.NotImplementedException(); }
public IResult ValidateComponent(DrawFileComponentType type) { ComponentValidator valid = new ComponentValidator(); return(valid.ValidateComponent(type)); }
public IDataResult <IStageComponent> GetComponent(DrawFileComponentType type) { ComponentReader reader = new ComponentReader(); return(reader.GetComponent(type)); }
public IResult ValidateComponent(DrawFileComponentType type) { throw new System.NotImplementedException(); }