public TagAdminPageViewModel(IServiceProvider serviceProvider, ITeamFoundationContext teamFoundationContext, ITagAdminContext tagAdminContext) { _serviceProvider = serviceProvider; _teamFoundationContext = teamFoundationContext; _tagAdminContext = tagAdminContext; _eventAggregator = _tagAdminContext.EventAggregator; var logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), $"Tag Admin for Visual Studio 2017\\TagAdminForVisualStudio2017-{DateTime.Now:dd-MM-yyyy}.log"); _log = new LoggerConfiguration().WriteTo.File(logPath, fileSizeLimitBytes: 5000000) .CreateLogger(); _log.Information("Initializing TagAdminPageViewModel - ServiceProvider: {serviceprovider}, TFSContext: {@tfs}, TagAdminContext: {@tagAdmin}", _serviceProvider != null, new { Collection = _teamFoundationContext.TeamProjectCollection.Name, User = _teamFoundationContext.TeamProjectCollection.ConfigurationServer.AuthorizedIdentity.UniqueName, Project = _teamFoundationContext.TeamProjectName, }, _tagAdminContext.EventAggregator != null); ShowBusy(true); Subscriptions(); Triggers(); }
public AssociatedWorkitemViewModel(IServiceProvider serviceProvider, ITeamFoundationContext teamFoundationContext, ITagAdminContext tagAdminContext, List <Tag> tagsList) { _serviceProvider = serviceProvider; _teamFoundationContext = teamFoundationContext; _tagAdminContext = tagAdminContext; _tagsList = tagsList; _eventAggregator = _tagAdminContext.EventAggregator; var logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), string.Format("Tag Admin for Visual Studio 2015\\TagAdminForVisualStudio2015-{0}.log", DateTime.Now.ToString("dd-MM-yyyy"))); _log = new LoggerConfiguration().WriteTo.File(logPath, fileSizeLimitBytes: 5000000) .CreateLogger(); _log.Information("Initializing AssociatedWorkitemViewModel - ServiceProvider: {serviceprovider}, TFSContext: {@tfs}, TagsCount: {tagsCount}", _serviceProvider != null, new { Collection = _teamFoundationContext.TeamProjectCollection.Name, User = _teamFoundationContext.TeamProjectCollection.ConfigurationServer.AuthorizedIdentity.UniqueName, Project = _teamFoundationContext.TeamProjectName, }, tagsList.Count); Subscriptions(); Triggers(); }
public TagAdminPageContent(IServiceProvider serviceProvider, ITeamFoundationContext currentContext, ITagAdminContext tagAdminContext) { InitializeComponent(); DataContext = new TagAdminPageViewModel(serviceProvider, currentContext, tagAdminContext); }
public AssociatedWorkitemsPageContent(IServiceProvider serviceProvider, ITeamFoundationContext teamFoundationContext, ITagAdminContext tagAdminContext, object context) { InitializeComponent(); var tagsList = context as AsyncObservableCollection <Tag>; DataContext = new AssociatedWorkitemViewModel(serviceProvider, teamFoundationContext, tagAdminContext, tagsList?.ToList()); }