public TemporaryMaterialServiceTest() { _materialService = new TemporaryMaterialService(AccountModel); }
public CustomServiceMessageServiceTest() { _customServiceMessageService = new CustomServiceMessageService(AccountModel); _temporaryMaterialService = new TemporaryMaterialService(AccountModel); }
/// <summary> /// 添加一个临时缩略图素材。 /// </summary> /// <param name="temporaryMaterialService">临时素材服务。</param> /// <param name="bytes">缩略图素材内容。</param> /// <returns>添加临时素材的结果模型。</returns> public static AddTemporaryMaterialResultModel AddTemporaryThumbnails(this ITemporaryMaterialService temporaryMaterialService, byte[] bytes) { return(temporaryMaterialService.NotNull("temporaryMaterialService").AddTemporary(bytes, MaterialType.Thumb)); }
/// <summary> /// 添加一个临时素材。 /// </summary> /// <param name="temporaryMaterialService">临时素材服务。</param> /// <param name="bytes">素材内容。</param> /// <returns>添加临时素材的结果模型。</returns> public static AddTemporaryMaterialResultModel AddTemporary(this ITemporaryMaterialService temporaryMaterialService, byte[] bytes) { var type = MaterialHelper.GetMaterialType(bytes); return(temporaryMaterialService.NotNull("temporaryMaterialService").AddTemporary(bytes, type)); }
public ForeverMaterialTest() { _materialService = new ForeverMaterialService(AccountModel); _temporaryMaterialService = new TemporaryMaterialService(AccountModel); }