本文整理汇总了C#中ICacheService类的典型用法代码示例。如果您正苦于以下问题:C# ICacheService类的具体用法?C# ICacheService怎么用?C# ICacheService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICacheService类属于命名空间,在下文中一共展示了ICacheService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update(ICacheService cacheService, Account selectedAccount, WorkPeriod currentWorkPeriod)
{
var accountType = cacheService.GetAccountTypeById(selectedAccount.AccountTypeId);
var transactions = Dao.Query(GetCurrentRange(accountType.DefaultFilterType, x => x.AccountId == selectedAccount.Id, currentWorkPeriod)).OrderBy(x => x.Date);
Transactions = transactions.Select(x => new AccountDetailData(x, selectedAccount)).ToList();
if (accountType.DefaultFilterType > 0)
{
var pastDebit = Dao.Sum(x => x.Debit, GetPastRange(accountType.DefaultFilterType, x => x.AccountId == selectedAccount.Id, currentWorkPeriod));
var pastCredit = Dao.Sum(x => x.Credit, GetPastRange(accountType.DefaultFilterType, x => x.AccountId == selectedAccount.Id, currentWorkPeriod));
var pastExchange = Dao.Sum(x => x.Exchange, GetPastRange(accountType.DefaultFilterType, x => x.AccountId == selectedAccount.Id, currentWorkPeriod));
if (pastCredit > 0 || pastDebit > 0)
{
Summaries.Add(new AccountSummaryData(Resources.Total, Transactions.Sum(x => x.Debit), Transactions.Sum(x => x.Credit)));
var detailValue =
new AccountDetailData(
new AccountTransactionValue
{
Name = Resources.PastTransactions,
Credit = pastCredit,
Debit = pastDebit,
Exchange = pastExchange
}, selectedAccount) { IsBold = true };
Transactions.Insert(0, detailValue);
}
}
Summaries.Add(new AccountSummaryData(Resources.GrandTotal, Transactions.Sum(x => x.Debit), Transactions.Sum(x => x.Credit)));
for (var i = 0; i < Transactions.Count; i++)
{
Transactions[i].Balance = (Transactions[i].Debit - Transactions[i].Credit);
if (i > 0) (Transactions[i].Balance) += (Transactions[i - 1].Balance);
}
}
示例2: PrinterMapViewModel
public PrinterMapViewModel(PrinterMap model, IMenuService menuService, IPrinterDao printerDao, ICacheService cacheService)
{
Model = model;
_menuService = menuService;
_printerDao = printerDao;
_cacheService = cacheService;
}
示例3: PackagesController
public PackagesController(
IPackageService packageService,
IUploadFileService uploadFileService,
IUserService userService,
IMessageService messageService,
ISearchService searchService,
IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
INuGetExeDownloaderService nugetExeDownloaderService,
IPackageFileService packageFileService,
IEntitiesContext entitiesContext,
IAppConfiguration config,
IIndexingService indexingService,
ICacheService cacheService)
{
_packageService = packageService;
_uploadFileService = uploadFileService;
_userService = userService;
_messageService = messageService;
_searchService = searchService;
_autoCuratedPackageCmd = autoCuratedPackageCmd;
_nugetExeDownloaderService = nugetExeDownloaderService;
_packageFileService = packageFileService;
_entitiesContext = entitiesContext;
_config = config;
_indexingService = indexingService;
_cacheService = cacheService;
}
示例4: ExecutePrintJob
public ExecutePrintJob(ITicketService ticketService, IApplicationState applicationState, ICacheService cacheService, IPrinterService printerService)
{
_ticketService = ticketService;
_applicationState = applicationState;
_cacheService = cacheService;
_printerService = printerService;
}
示例5: TicketTotalsViewModel
public TicketTotalsViewModel(ICacheService cacheService, AccountBalances accountBalances)
{
_cacheService = cacheService;
_accountBalances = accountBalances;
ResetCache();
_model = Ticket.Empty;
}
示例6: TagController
public TagController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicTagService topicTagService, ICategoryService categoryService, ICacheService cacheService)
: base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
{
_topicTagService = topicTagService;
_categoryService = categoryService;
_cacheService = cacheService;
}
示例7: TorznabController
public TorznabController(IIndexerManagerService i, Logger l, IServerService s, ICacheService c)
{
indexerService = i;
logger = l;
serverService = s;
cacheService = c;
}
示例8: MenuItemSelectorViewModel
public MenuItemSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IMenuService menuService,
ISettingService settingService, ICacheService cacheService)
{
_applicationState = applicationState;
_applicationStateSetter = applicationStateSetter;
_menuService = menuService;
_settingService = settingService;
_cacheService = cacheService;
CategoryCommand = new DelegateCommand<ScreenMenuCategory>(OnCategoryCommandExecute);
MenuItemCommand = new DelegateCommand<ScreenMenuItem>(OnMenuItemCommandExecute);
TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecute);
FindLocationCommand = new DelegateCommand<string>(OnFindLocationExecute, CanFindLocation);
FindMenuItemCommand = new DelegateCommand<string>(OnFindMenuItemCommand);
FindTicketCommand = new DelegateCommand<string>(OnFindTicketExecute, CanFindTicket);
IncPageNumberCommand = new CaptionCommand<string>(Localization.Properties.Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
DecPageNumberCommand = new CaptionCommand<string>("<< " + Localization.Properties.Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);
SubCategoryCommand = new CaptionCommand<ScreenSubCategoryButton>(".", OnSubCategoryCommand);
EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(OnDepartmentChanged);
EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnNumeratorReset);
NumeratorValue = "";
SubCategories = new ObservableCollection<ScreenSubCategoryButton>();
}
示例9: AbstractHttpDataService
public AbstractHttpDataService(string baseUrl, string username, string password, ICacheService cacheService)
{
this.BaseUrl = baseUrl;
this.UserName = username;
this.Password = password;
this.CacheService = cacheService;
}
示例10: ReturningAmountViewModel
public ReturningAmountViewModel(ICacheService cacheService, IApplicationState applicationState,
PaymentEditor paymentEditor)
{
_cacheService = cacheService;
_applicationState = applicationState;
_paymentEditor = paymentEditor;
}
示例11: TicketListerWidgetViewModel
public TicketListerWidgetViewModel(Widget model, IApplicationState applicationState, ITicketServiceBase ticketService,
IPrinterService printerService, ICacheService cacheService, IAutomationDao automationDao)
: base(model, applicationState)
{
_applicationState = applicationState;
_ticketService = ticketService;
_printerService = printerService;
_cacheService = cacheService;
_automationDao = automationDao;
ItemSelectionCommand = new DelegateCommand<TicketViewData>(OnItemSelection);
EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
x =>
{
if (_applicationState.ActiveAppScreen == AppScreens.EntityView
&& x.Topic == EventTopicNames.MessageReceivedEvent
&& x.Value.Command == Messages.TicketRefreshMessage)
{
Refresh();
}
});
EventServiceFactory.EventService.GetEvent<GenericEvent<WidgetEventData>>().Subscribe(
x =>
{
if (x.Value.WidgetName == Name)
{
State = x.Value.Value;
}
});
}
示例12: ReturningAmountViewModel
public ReturningAmountViewModel(ICacheService cacheService, IAutomationService automationService,
PaymentEditor paymentEditor)
{
_cacheService = cacheService;
_automationService = automationService;
_paymentEditor = paymentEditor;
}
示例13: SubentroWCFService
public SubentroWCFService(IVersamentiCondominiService versamentiCondominiService, INotaPredefinitaService notaPredefinitaService, IPersonaService personaService, ICacheService cacheService)
{
_versamentiCondominiService = versamentiCondominiService;
_notaPredefinitaService = notaPredefinitaService;
_personaService = personaService;
_cacheService = cacheService;
}
示例14: ChangeTicketEntity
public ChangeTicketEntity(ITicketService ticketService, IApplicationState applicationState, ICacheService cacheService, IEntityService entityService)
{
_ticketService = ticketService;
_applicationState = applicationState;
_cacheService = cacheService;
_entityService = entityService;
}
示例15: BatchDocumentCreatorViewModel
public BatchDocumentCreatorViewModel(IAccountService accountService, ICacheService cacheService)
{
Accounts = new ObservableCollection<AccountRowViewModel>();
_accountService = accountService;
_cacheService = cacheService;
CreateDocuments = new CaptionCommand<string>(string.Format(Resources.Create_f, "").Trim(), OnCreateDocuments, CanCreateDocument);
}