public CategoryController(ILogger <CategoryController> logger, ICategories categories, ITypes types) { //_db = db; _type = types; _logger = logger; _repo = categories; }
/// <summary> /// Create new or updated existent Category. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='category'> /// New or existent Category /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PostCategoryAsync(this ICategories operations, Category category, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostCategoryWithHttpMessagesAsync(category, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public CategoriesService(ICategoriesList categoriesListUtil, ICategoryDetails categoryDetails, ICategories categoriesBusinessObject) { this.categoriesListUtil = categoriesListUtil; this.categoryDetails = categoryDetails; this.categoriesBusinessObject = categoriesBusinessObject; }
/// <summary> /// Return all Categories from data source. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <Category> > GetCategoriesAsync(this ICategories operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetCategoriesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public LispExecuter(ILogger logger, ICategories categories) { _logger = logger.CreateSub("Lisp"); _categories = categories ?? throw new ArgumentNullException(nameof(categories)); _logger.RegisterCategory(_categories.ScriptLogging, "Script Logging"); _env = new Dictionary <string, string>(); _var = new Dictionary <string, object>(); _commands = new Dictionary <string, LispRuntimeCommand>(); RegisterCommand("Get", EX_GetVariable); RegisterCommand("GetMember", EX_GetVariableMember); RegisterCommand("Set", EX_SetVariable); RegisterCommand("GetEnvironment", EX_GetEnvironment); RegisterCommand("If", EX_If); RegisterCommand("Equals", EX_Equal); RegisterCommand("NotEquals", (cmd, p) => !((bool)EX_Equal(cmd, p))); RegisterCommand("Loop", EX_Loop); RegisterCommand("While", EX_While); RegisterCommand("Not", EX_Not); RegisterCommand("And", Ex_And); RegisterCommand("Or", Ex_Or); RegisterCommand("Add", Ex_Add); RegisterCommand("Sub", Ex_Sub); RegisterCommand("GreaterThan", Ex_GreaterThan); RegisterCommand("GreaterThanEqual", Ex_GreaterThanEqual); RegisterCommand("LessThan", Ex_LessThan); RegisterCommand("LessThanEqual", Ex_LessThanEqual); RegisterCommand("ForEach", Ex_ForEach); RegisterCommand("GetArg", Ex_GetArg); RegisterCommand("Assert", Ex_Assert); RegisterCommand("Array", Ex_Array); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.Ads = new Ads(this); this.Categories = new Categories(this); this.BaseUri = new Uri("https://-complete-dataapi.azurewebsites.net"); SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
public ScriptEngine(ILogger logger, ICategories categories) : base(logger, categories) { RegisterCommand("ChangeExtension", Run_ChangeExtension); RegisterCommand("CorrelationFilter", Run_CorrelationFilter); RegisterCommand("DrawArray", Run_DrawArray); RegisterCommand("DrawCaves", Run_DrawCaves); RegisterCommand("DrawClassification", Run_DrawClassification); RegisterCommand("DrawElevationColor", Run_DrawElevationColor); RegisterCommand("DrawHoles", Run_DrawHoles); RegisterCommand("DrawHillsideShade", Run_DrawHillsideShade); RegisterCommand("DrawLogArray", Run_DrawLogArray); RegisterCommand("DrawRealColor", Run_DrawRealColor); RegisterCommand("DrawSlopeColor", Run_DrawSlopeColor); RegisterCommand("Echo", Run_Echo); RegisterCommand("EnumerateDirectory", Run_EnumerateDirectory); RegisterCommand("FileExists", Run_FileExists); RegisterCommand("FillHoles", Run_FillHoles); RegisterCommand("FindCavesByFlood", Run_FindCavesByFlood); RegisterCommand("GenerateMap", Run_GenerateMap); RegisterCommand("GetExtension", Run_GetExtension); RegisterCommand("LevelDetectFilter", Run_LevelDetectFilter); RegisterCommand("MakeImage", Run_MakeImage); RegisterCommand("MakeMap", Run_MakeMap); RegisterCommand("MapCalculateSlopeAngle", Run_MapCalculateSlopeAngle); RegisterCommand("MapDrainage", Run_MapDrainage); RegisterCommand("MapGeometricMeanFilter", MapGeometricMeanFilter); RegisterCommand("MorphologicalFilter", Run_MorphologicalFilter); RegisterCommand("ReadFile", Run_ReadFile); RegisterCommand("SaveToFile", Run_SaveToFile); RegisterCommand("SelectOne", Run_SelectOne); }
/// <summary> /// Deletes the Category. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of the Category /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Category> DeleteCategoryAsync(this ICategories operations, long id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteCategoryWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public BrigitaProducts( IRepo<Product> repo, ICategories cats, ILocalizer<Product> localizer) { _repo = repo; _cats = cats; _localizer = localizer; }
public AdminController(IAdmin authProvider, IPosts blogRepository = null, IFeedback feedbackRepository = null, IUsligi services = null, IPhoto photo = null, ICategories cat = null) { _blogRepository = blogRepository; _authProvider = authProvider; _feedbackRepository = feedbackRepository; _servicesRepository = services; _photoRepository = photo; _catRepository = cat; }
public ContentsController() { _contentHandler = new ContentRepository(); _categoriesHandler = new CategoriesRepository(); _sitesHandler = new SitesRepository(); // Настройка AutoMapper Mapper.Initialize(cfg => cfg.CreateMap <Contents, ContentViewModel>() .ForMember("introtext", opt => opt.MapFrom(c => new HtmlString(c.introtext)))); }
public DetailsForm(IClassify classifyEngine, ICategories categories, string rawText) { _htmlDisplay = new HtmlDisplay(classifyEngine, categories, rawText); // we can now init everything. InitializeComponent(); // maximized the window. WindowState = FormWindowState.Maximized; }
public async Task <int> CategoryUpdateAsync(ICategories category) { if (category != null && category.ProductId != null && string.IsNullOrEmpty(category.Name)) { throw new ArgumentNullException("category"); } return(await categoryRepository.CreateProductAsync(category)); }
public HtmlDisplay(IClassify classifyEngine, ICategories categories, string rawText) { // the raw text _rawText = rawText; // the categories _categories = categories; // the classifier engine _classifyEngine = classifyEngine; }
public ChooseCategoryForm(IEnumerable <Category> preferedCategories, ICategories categories, IOptions options) { // the chosen categories. _preferedCategories = preferedCategories; // the categories _categories = categories; // the options _options = options; InitializeComponent(); }
public CategoriesForm(ICategories categories, IConfig config, IFolders folders) { // the categories _categories = categories; // the config _config = config; // the outlook root project. _folders = folders; InitializeComponent(); }
public MagnetForm(IMagnets magnets, ICategories categories, Magnet magnet) { // InitializeComponent(); // the engine to create new categories. _magnets = magnets; // the category we working with. GivenMagnet = magnet; // the categories _Categories = categories; }
public PhotoViewModel(Guid Id, IPhoto photoRepository, ICategories categoryRepository) { Categories = categoryRepository.Category(Id); if (Categories != null) { var post = mapping.GetCategoryById(Categories.id); if (post.Album != null) { var album = photoRepository.PhotosForAlbum(post.Album.id); if (album != null) { Photos = photoRepository.PhotosForAlbum(post.Album.id); } } } }
public CategoryForm(ICategories categories, IConfig config, IFolders folders, Category category) { // InitializeComponent(); // the categories _categories = categories; // the config _config = config; // the outlook root project. _folders = folders; // the category we working with. GivenCategory = category; }
public MagnetMailItemForm(ILogger logger, IMagnets magnets, ICategories categories, Outlook._MailItem mailItem) { // InitializeComponent(); // the logger. _logger = logger; // the magnets _magnets = magnets; // the mail item _mailItem = mailItem; // the categories _categories = categories; }
/// <summary> /// The constructor. /// </summary> /// <param name="categories"></param> /// <param name="mailProcessor">The mail processor</param> /// <param name="options"></param> /// <param name="logger"></param> public ItemMove(ICategories categories, IMailProcessor mailProcessor, IOptions options, ILogger logger) { if (categories == null) { throw new ArgumentNullException(nameof(categories)); } if (mailProcessor == null) { throw new ArgumentNullException(nameof(mailProcessor)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _mailProcessor = mailProcessor; _logger = logger; _categories = categories; _options = options; }
/// <summary> /// Return Category by id. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of Category /// </param> public static Category GetCategory(this ICategories operations, long id) { return(Task.Factory.StartNew(s => ((ICategories)s).GetCategoryAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public CategoriesPresenter(ICategories view, INavigationWorkflow navigation) { this._view = view; this._navigation = navigation; }
public ScopedCategories(ICategories cats) { _cats = cats; }
/// <summary> /// Put updated Category. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of the Category /// </param> /// <param name='category'> /// Existent Category /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutCategoryAsync(this ICategories operations, long id, Category category, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutCategoryWithHttpMessagesAsync(id, category, null, cancellationToken).ConfigureAwait(false); }
public ItemController(IItems iitems, ICategories icategories, UserManager <User> userManager) { _items = iitems; _categories = icategories; _userManager = userManager; }
public CategoriesController(ICategories icategories) { this.icategories = icategories; }
/// <summary> /// Put updated Category. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of the Category /// </param> /// <param name='category'> /// Existent Category /// </param> public static void PutCategory(this ICategories operations, long id, Category category) { Task.Factory.StartNew(s => ((ICategories)s).PutCategoryAsync(id, category), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
public int PageSize = 6; // The field specifies that I want four products per page. public ProductController(IAllProducts allProducts, ICategories allCategories) { this.allProducts = allProducts; this.allCategories = allCategories; }
public OptionsForm(IEngine engine, ICategories categories) { _engine = engine; _categories = categories; InitializeComponent(); }
public static int IntsertCategories(ICategories cate) { return(ICategories.IntsertCategories(cate)); }
public CategoryManager(ICategories categoriesRepository) { Repo = categoriesRepository; }
public CategoryDetails(ICategories categoriesBusinessObject, IProducts productsBusinessObject) { this.categoriesBusinessObject = categoriesBusinessObject; this.productsBusinessObject = productsBusinessObject; }