public DataServices(DateTime date) { PortiaService = new PortiaServiceImpl(date); DtcService = new DtcServiceImpl(date); ReconService = new ComparisonServiceImpl(date); }
public AlbumsGroupUserControlViewModel(IDataService dataService, INavigationService navigationService) { this.m_dataService = dataService; this.m_navigationService = navigationService; this.DataGroup = new DataGroupViewModel(); this.LoadData(); }
public MessagingControllerImpl(IDataService dataService) { //Argument Contract Requires.NotNull("dataService", dataService); _dataService = dataService; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public ViewModel(IDataService dataService) { _dataService = dataService; monitorServersThread = new Thread(monitorServersThreadRun); monitorServersThread.Start(); }
public MainViewModel( IViewModelCreatorService viewModelCreatorService, IDataService dataService) { _viewModelCreatorService = viewModelCreatorService; _dataService = dataService; }
public static UmbracoContentIndexer GetUmbracoIndexer( Lucene.Net.Store.Directory luceneDir, Analyzer analyzer = null, IDataService dataService = null) { if (dataService == null) { dataService = new TestDataService(); } if (analyzer == null) { analyzer = new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29); } var indexSet = new IndexSet(); var indexCriteria = indexSet.ToIndexCriteria(dataService, UmbracoContentIndexer.IndexFieldPolicies); var i = new UmbracoContentIndexer(indexCriteria, luceneDir, //custom lucene directory dataService, analyzer, false); //i.IndexSecondsInterval = 1; i.IndexingError += IndexingError; return i; }
public RegisterViewModel(INavigationService navigationService) { this.User = new User(); this.navigationService = navigationService; this.dataService = SimpleIoc.Default.GetInstance<IDataService>(); this.BackCommand = new RelayCommand<string>((s) => { this.navigationService.GoBack(); }); this.RegisterCommand = new RelayCommand(async() => { if (this.User.Password == this.User.RepeatedPassword) { await dataService.CreateUser(this.User.Username, this.User.Password, this.User.Email); //if registration is faild if (((App)App.Current).AuthenticatedUser != null && ((App)App.Current).AuthenticatedUser.IsAuthenticated) { this.navigationService.Navigate(ViewsType.Groups); } } else { new MessageDialog("Двете пароли не съвпадат").ShowAsync(); } }); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IDataService dataService, Services.IQaStringGeneratorService generator) { _dataService = dataService; _generator = generator; _generatedTexts = new System.Collections.ObjectModel.ObservableCollection<TextItemViewModel>(); this.PropertyChanged += MainViewModel_PropertyChanged; _dataService.GetData( (item, error) => { if (error != null) { // Report error here return; } _pattern = item.LastPattern; _numberOfCharacters = item.LastCount; _qAApproved = item.LastQa; _countList = item.LastCountList; _results = _generator.Generate(this.NumberOfCharacters, this.Pattern, this.QAApproved); generateCountList(); }); }
public WarehouseItemsViewModel( IDataService dataService, IViewModelCreatorService viewModelCreatorService) { _dataService = dataService; _viewModelCreatorService = viewModelCreatorService; }
public CatalogueController(IDataService dataService, ISocialService socialService, IMailService mailService, IConvertService convertService, AuthorizationRoot authorizationRoot) : base(dataService, authorizationRoot) { _socialService = socialService; _mailService = mailService; _convertService = convertService; }
public PlayerManager(IDataService dataService, IAccountService accountService, IPlayerService playerService, IDialogService dialogservice, IResourceService resourceService) { this.m_dataService = dataService; this.m_accountService = accountService; this.PlayerService = playerService; this.m_dialogService = dialogservice; this.m_resourceService = resourceService; Messenger.Default.Register<MediaOpenedMessage>(this, message => { this.OnMediaOpened(); }); Messenger.Default.Register<MediaEndedMessage>(this, message => { this.OnMediaEnded(); }); Messenger.Default.Register<MediaNextPressedMessage>(this, message => { if (this.CanExecuteNextTrack()) { this.ExecuteNextTrack(); } }); Messenger.Default.Register<MediaPreviousPressedMessage>(this, message => { if (this.CanExecutePreviousTrack()) { this.ExecutePreviousTrack(); } }); }
/// <summary>Sorts a query like a SQL ORDER BY clause does.</summary> /// <param name="service">Service with data and configuration.</param> /// <param name="source">Original source for query.</param> /// <param name="orderingInfo">Ordering definition to compose.</param> /// <returns>The composed query.</returns> internal static IQueryable OrderBy(IDataService service, IQueryable source, OrderingInfo orderingInfo) { Debug.Assert(service != null, "service != null"); Debug.Assert(source != null, "source != null"); Debug.Assert(orderingInfo != null, "orderingInfo != null"); Expression queryExpr = source.Expression; string methodAsc = "OrderBy"; string methodDesc = "OrderByDescending"; foreach (OrderingExpression o in orderingInfo.OrderingExpressions) { LambdaExpression selectorLambda = (LambdaExpression)o.Expression; Type selectorType = selectorLambda.Body.Type; service.Provider.CheckIfOrderedType(selectorType); queryExpr = Expression.Call( typeof(Queryable), o.IsAscending ? methodAsc : methodDesc, new Type[] { source.ElementType, selectorType }, queryExpr, Expression.Quote(selectorLambda)); methodAsc = "ThenBy"; methodDesc = "ThenByDescending"; } return source.Provider.CreateQuery(queryExpr); }
/// <summary>Fires the notification for a single action.</summary> /// <param name="service">Service on which methods should be invoked.</param> /// <param name="target">Object to be tracked.</param> /// <param name="container">Container in which object is changed.</param> /// <param name="action">Action affecting target.</param> internal static void FireNotification(IDataService service, object target, ResourceSetWrapper container, UpdateOperations action) { Debug.Assert(service != null, "service != null"); AssertActionValues(target, container); MethodInfo[] methods = container.ChangeInterceptors; if (methods != null) { object[] parameters = new object[2]; parameters[0] = target; parameters[1] = action; for (int i = 0; i < methods.Length; i++) { try { methods[i].Invoke(service.Instance, parameters); } catch (TargetInvocationException exception) { ErrorHandler.HandleTargetInvocationException(exception); throw; } } } }
public BasePlaylistableViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService) { this.DataService = dataService; this.AccountService = accountService; this.DialogService = dialogService; this.ResourceService = resourceService; }
public CustomerDetailViewModel(Account account, Page currentPage) { if (account == null) { Account = new Account(); Account.Industry = Account.IndustryTypes[0]; Account.OpportunityStage = Account.OpportunityStages[0]; this.Title = "New Account"; } else { Account = account; this.Title = "Account"; } _CurrentPage = currentPage; this.Icon = "account.png"; _DataClient = DependencyService.Get<IDataService>(); _GeoCodingService = DependencyService.Get<IGeoCodingService>(); MessagingCenter.Subscribe<Account>(this, MessagingServiceConstants.ACCOUNT, (Account) => { IsInitialized = false; }); }
public ApplicationController(CompositionContainer container, IPresentationService presentationService, IMessageService messageService, ShellService shellService, ProxyController proxyController, DataController dataController) { InitializeCultures(); presentationService.InitializeCultures(); this.container = container; this.dataController = dataController; this.proxyController = proxyController; this.messageService = messageService; this.dataService = container.GetExportedValue<IDataService>(); this.floatingViewModel = container.GetExportedValue<FloatingViewModel>(); this.mainViewModel = container.GetExportedValue<MainViewModel>(); this.userBugsViewModel = container.GetExportedValue<UserBugsViewModel>(); this.teamBugsViewModel = container.GetExportedValue<TeamBugsViewModel>(); shellService.MainView = mainViewModel.View; shellService.UserBugsView = userBugsViewModel.View; shellService.TeamBugsView = teamBugsViewModel.View; this.floatingViewModel.Closing += FloatingViewModelClosing; this.showMainWindowCommand = new DelegateCommand(ShowMainWindowCommandExcute); this.englishCommand = new DelegateCommand(() => SelectLanguage(new CultureInfo("en-US"))); this.chineseCommand = new DelegateCommand(() => SelectLanguage(new CultureInfo("zh-CN"))); this.settingCommand = new DelegateCommand(SettingDialogCommandExcute, CanSettingDialogCommandExcute); this.aboutCommand = new DelegateCommand(AboutDialogCommandExcute); this.exitCommand = new DelegateCommand(ExitCommandExcute); }
/// <summary>Writes the Service Document to the output stream.</summary> /// <param name="service">Data service instance.</param> internal override void WriteRequest(IDataService service) { try { this.Writer.WriteStartElement(XmlConstants.AtomPublishingServiceElementName, XmlConstants.AppNamespace); this.IncludeCommonNamespaces(); this.Writer.WriteStartElement("", XmlConstants.AtomPublishingWorkspaceElementName, XmlConstants.AppNamespace); this.Writer.WriteStartElement(XmlConstants.AtomTitleElementName, XmlConstants.AtomNamespace); this.Writer.WriteString(XmlConstants.AtomPublishingWorkspaceDefaultValue); this.Writer.WriteEndElement(); foreach (ResourceSetWrapper container in this.Provider.ResourceSets) { this.Writer.WriteStartElement("", XmlConstants.AtomPublishingCollectionElementName, XmlConstants.AppNamespace); this.Writer.WriteAttributeString(XmlConstants.AtomHRefAttributeName, container.Name); this.Writer.WriteStartElement(XmlConstants.AtomTitleElementName, XmlConstants.AtomNamespace); this.Writer.WriteString(container.Name); this.Writer.WriteEndElement(); // Close 'title' element. this.Writer.WriteEndElement(); // Close 'collection' element. } this.Writer.WriteEndElement(); // Close 'workspace' element. this.Writer.WriteEndElement(); // Close 'service' element. } finally { this.Writer.Close(); } }
/// <summary> /// Overloaded Constructor /// </summary> /// <param name="dataService"></param> public LauncherViewModel(IDataService dataService) { // Store the data service object.. this._dataService = dataService; // Set default properties.. this.DeleteConfigVisibility = Visibility.Hidden; this.ConfigEditVisibility = Visibility.Hidden; this.TempConfig = null; // Connect command handlers.. this.NewConfigCommand = new RelayCommand(NewConfigClicked); this.EditConfigCommand = new RelayCommand(EditConfigClicked); this.SaveEditConfigCommand = new RelayCommand(SaveEditConfigClicked); this.CancelEditConfigCommand = new RelayCommand(CancelEditConfigClicked); this.BrowseLaunchFileCommand = new RelayCommand(BrowseLaunchFileClicked); this.DeleteConfigCommand = new RelayCommand(DeleteConfigClicked); this.ConfirmDeleteConfigCommand = new RelayCommand(ConfirmDeleteConfigClicked); this.CancelDeleteConfigCommand = new RelayCommand(CancelDeleteConfigClicked); this.LaunchCommand = new RelayCommand(LaunchClicked); // Populate the configuration collection.. this._dataService.GetConfigurationFiles( (configs, error) => { this.Configurations = (error == null) ? new ObservableCollection<Configuration>(configs) : new ObservableCollection<Configuration>(); }); }
public LeadDetailViewModel(INavigation navigation, Account lead = null) { if (navigation == null) { throw new ArgumentNullException("navigation", "An instance of INavigation must be passed to the LeadDetailViewModel constructor."); } Navigation = navigation; if (lead == null) { Lead = new Account(); this.Title = TextResources.Leads_NewLead; } else { Lead = lead; this.Title = lead.Company; } this.Icon = "contact.png"; _DataClient = DependencyService.Get<IDataService>(); _GeoCodingService = DependencyService.Get<IGeoCodingService>(); }
public RoomSearchViewModel(IDataService dataService, ProgressViewModel progressViewModel) { _dataService = dataService; _progressViewModel = progressViewModel; SearchCommand = new RelayCommand(PerformSearch, () => SelectedRooms != null && SelectedRooms.Count > 0); ResetData(); SelectedDate = DateTime.Today; SelectedStartTime = DateTime.Now; var today = Today; if (DateTime.Now > today.AddHours(16)) { SelectedEndTime = DateTime.Now.AddHours(1); } else if (DateTime.Now >= today.AddHours(12)) { SelectedEndTime = today.AddHours(16); } else { SelectedEndTime = today.AddHours(12); } SelectedExtras = RoomExtras.None; _progressViewModel.DataReloaded += OnDataReloaded; }
protected DataController(IDataService dataService, AuthorizationRoot authorizationRoot) { DataService = dataService; AuthorizationRoot = authorizationRoot; SetFacebOokkAplicationId(); }
public OrdersViewModel(Account account) { Account = account; _Orders = new List<Order>(); _DataClient = DependencyService.Get<IDataService>(); OrderGroups = new ObservableCollection<Grouping<Order, string>>(); MessagingCenter.Subscribe<Order>(this, MessagingServiceConstants.SAVE_ORDER, order => { var index = _Orders.IndexOf(order); if (index >= 0) { _Orders[index] = order; } else { _Orders.Add(order); } GroupOrders(); }); }
/// <summary> /// /// </summary> public QueryService() { DataService = new DataService(); QueryTcpClient = new QueryTcpClient(); QueryTcpServer = new QueryTcpServer(); QueryTcpServer.QueryService = this; }
public SearchResultPageViewModel(IDataService dataService, INavigationService navigationService, IResourceService resourceService, IDialogService dialogService) { this.m_dataService = dataService; this.m_navigationService = navigationService; this.m_resourceService = resourceService; this.m_dialogservice = dialogService; }
public GroupsViewModel(INavigationService navigationService) { this.dataService = SimpleIoc.Default.GetInstance<IDataService>(); this.AllGroups = new ObservableCollection<Groups>(); GetAllGroupsAsync(); this.navigationService = navigationService; }
public ContactListViewModel( IDataService pDataService ) { _dataService = pDataService; this.SmallTitle = "CONTACT TRACKER"; this.BigTitle = "contacts"; }
public PlayerManager(IDataService dataService, IAuthenticationService accountService, IPlayerService playerService, IDialogService dialogservice, IResourceService resourceService) { this.m_dataService = dataService; this.m_accountService = accountService; this.PlayerService = playerService; this.m_dialogService = dialogservice; this.m_resourceService = resourceService; Messenger.Default.Register<MediaStateChangedArgs>(this, args => { switch (args.MediaState) { case MediaState.Opened: OnMediaOpened(); break; case MediaState.Ended: this.OnMediaEnded(); break; case MediaState.NextRequested: ExecuteNextTrack(); break; case MediaState.PreviousRequested: ExecutePreviousTrack(); break; case MediaState.DownloadCompleted: PrepareNextTrack(); break; } }); }
public ArtistViewModel(IDataService dataService, INavigationService navigationService) { _dataService = dataService; _navigationService = navigationService; Task.Run(() => Initialize()); }
/// <summary>Handles an exception when processing a batch response.</summary> /// <param name='service'>Data service doing the processing.</param> /// <param name="host">host to which we need to write the exception message</param> /// <param name='exception'>Exception thrown.</param> /// <param name='writer'>Output writer for the batch.</param> internal static void HandleBatchProcessException(IDataService service, DataServiceHostWrapper host, Exception exception, StreamWriter writer) { Debug.Assert(service != null, "service != null"); Debug.Assert(host != null, "host != null"); Debug.Assert(exception != null, "exception != null"); Debug.Assert(writer != null, "writer != null"); Debug.Assert(service.Configuration != null, "service.Configuration != null"); Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); string contentType; Encoding encoding; TryGetResponseFormatForError(host, out contentType, out encoding); HandleExceptionArgs args = new HandleExceptionArgs(exception, false, contentType, service.Configuration.UseVerboseErrors); service.InternalHandleException(args); host.ResponseVersion = XmlConstants.DataServiceVersion1Dot0 + ";"; host.ProcessException(args); writer.Flush(); Action<Stream> errorWriter = ProcessBenignException(exception, service); if (errorWriter == null) { errorWriter = CreateErrorSerializer(args, encoding); } errorWriter(writer.BaseStream); writer.WriteLine(); }
/// <summary> /// Initializes a new instance of the TaskViewModel class. /// </summary> public TaskViewModel(Task model, string listId, IDataService dataService, INavigationService navigationService, IDialogService dialogService) : base(dataService, navigationService, dialogService) { _model = model; _listId = listId; update(); }
public User(ILoggingService log, IDataService <IWebApiDataServiceQR> dataService, xDTO.User dto) : this(log, dataService) { _dto = dto; }
public ReservationRequestStatusType(ILoggingService log, IDataService <IWebApiDataServiceQR> dataService) : base(log, dataService) { _dto = new xDTO.ReservationRequestStatusType(); OnLazyLoadRequest += HandleLazyLoadRequest; }
public OrderedListViewModel() { dataService = new OrderService(); SearchCommand = new DelegateCommand(SearchOrderList); }
// now you can inject any an other data service without model changes // XmlDataService, WebDataService, etc public CustomerModel(IDataService dataService) { this.dataService = dataService; }
public DataController(IDataService dataService) { _dataService = dataService; }
public UmbracoMemberIndexer(IIndexCriteria indexerData, DirectoryInfo indexPath, IDataService dataService, Analyzer analyzer, bool async) : base(indexerData, indexPath, dataService, analyzer, async) { }
public MethodCreationDialogViewModel(IDataService <LabDbEntities> labDbdata) : base() { _labDbData = labDbdata; OemList = _labDbData.RunQuery(new OrganizationsQuery() { Role = OrganizationsQuery.OrganizationRoles.StandardPublisher }) .ToList();; PropertiesList = _labDbData.RunQuery(new PropertiesQuery()).ToList(); CancelCommand = new DelegateCommand <Window>( parent => { parent.DialogResult = false; }); ConfirmCommand = new DelegateCommand <Window>( parent => { MethodInstance = new Method() { Duration = WorkHours, Description = Description, Name = "", PropertyID = _selectedProperty.ID, ShortDescription = ShortDescription, TBD = "" }; if (_standardInstance == null) { _standardInstance = new Std { Name = Name, OrganizationID = _selectedOem.ID, CurrentIssue = "" }; MethodInstance.Standard = _standardInstance; } else { if (_selectedOem.ID != _standardInstance.OrganizationID) { _standardInstance.OrganizationID = _selectedOem.ID; _standardInstance.Update(); } MethodInstance.StandardID = _standardInstance.ID; } int subMethodPositioncounter = 0; foreach (SubMethod subm in SubMethodList) { subm.Position = subMethodPositioncounter++; MethodInstance.SubMethods.Add(subm); } MethodInstance.MethodVariants .Add(new MethodVariant() { Description = "", Name = "Standard" }); parent.DialogResult = true; }, parent => !HasErrors); Description = ""; Name = ""; SelectedOem = null; SelectedProperty = null; ShortDescription = ""; SubMethodList = new ObservableCollection <SubMethod>(); WorkHours = 0; SubMethodList.CollectionChanged += OnSubMethodListChanged; }
public Parser(Globals globals, IDataService dataservice) { _globals = globals; _dataservice = dataservice; }
public CreateCategoryCommandHandler(IDataService context) { this.context = context; }
public User(ILoggingService log, IDataService <IWebApiDataServiceQR> dataService) : base(log, dataService) { _dto = new xDTO.User(); OnLazyLoadRequest += HandleLazyLoadRequest; }
/// <summary> /// Initializes a new instance of the <see cref="ContentController"/> class. /// </summary> /// <param name="dataService"></param> public ContentController(IDataService dataService) { this._dataService = dataService; }
public GanttDataService(ILogger <GanttDataService> logger, IDataService dataService) { this.logger = logger; this.dataService = dataService; }
public LoginViewModel(Page parentPage) { Title = "PDP Tracker"; CurrentPage = parentPage; _dataService = new DataService(); }
private OneBrokenFileTransferModel(IDataService dataService, int friendNumber, int fileNumber, string name, long fileSizeInBytes, TransferDirection direction, Stream stream, long transferredBytes = 0) : base(dataService, friendNumber, fileNumber, name, fileSizeInBytes, direction, stream, transferredBytes) { }
public UmbracoContentIndexer(IIndexCriteria indexerData, Lucene.Net.Store.Directory luceneDirectory, IDataService dataService, Analyzer analyzer, bool async) : base(indexerData, luceneDirectory, dataService, analyzer, async) { }
public CategoriesController(IDataService dataService, IMapper mapper) { _dataService = dataService; _mapper = mapper; }
public AddChangeEventModel(IAuthService authService, IMetaTagService imts, IDataService ds) : base(authService, imts, ds) { }
public MockGameService(IDataService <User> userService) { _userService = userService; }
public EditTwitterAccountInfoModel(IAuthService authService, IMetaTagService imts, IDataService ds, ITagService ts) : base(authService, imts, ds) { }
public AuditDSSetting(IDataService dataService, string connStringName) { this.DataServiceType = dataService.GetType(); this.ConnString = dataService.CustomizationString; this.ConnStringName = connStringName; }
public AddEntityModel(IAuthService authService, IMetaTagService imts, ITagService ts, IDataService ds) : base(authService, imts, ds) { }
internal DataServiceProviderWrapper(DataServiceCacheItem cacheItem, IDataServiceMetadataProvider metadataProvider, IDataServiceQueryProvider queryProvider, IDataService dataService) { this.metadata = cacheItem; this.metadataProvider = metadataProvider; this.queryProvider = queryProvider; this.dataService = dataService; this.operationWrapperCache = new Dictionary <string, OperationWrapper>(EqualityComparer <string> .Default); this.metadataProviderEdmModels = new Dictionary <DataServiceOperationContext, MetadataProviderEdmModel>(EqualityComparer <DataServiceOperationContext> .Default); this.models = new Dictionary <DataServiceOperationContext, IEdmModel>(EqualityComparer <DataServiceOperationContext> .Default); this.edmSchemaVersion = MetadataEdmSchemaVersion.Version1Dot0; this.containerNameCache = null; this.containerNamespaceCache = null; }
public ExamManager_chengduduolun (IProviderFactory providerFactory, ISpeaker speaker, IMessenger messenger, IExamScore examScore, IDataService dataService, IGpsPointSearcher pointSearcher, ILog logger) : base(providerFactory, speaker, messenger, examScore, dataService, pointSearcher, logger) { }
public QuotePageModel(IDataService dataService) { _dataService = dataService; }
public PublicAccessController(ImageStore imageStore, IDataService dataService) { _imageStore = imageStore; _dataService = dataService; }
public IndexModel(IDataService db, INotificationService ns) { _db = db; _ns = ns; BlogItem = new BlogItem(); }
public ImportService(IDataService db, IStorageService ss) { _db = db; _ss = ss; _msgs = new List <ImportMessage>(); }
public PostController(IDataService dataService) : base(dataService) { }
public ExchangeService(IRateClient rateClient, IDataService dataService) { this.rateClient = rateClient; this.dataService = dataService; }
public ObservableQuery(IDataService db) { _db = db; H.Initialize(this, OnPropertyChanged); }