当前位置: 首页>>代码示例>>C#>>正文


C# IAppService类代码示例

本文整理汇总了C#中IAppService的典型用法代码示例。如果您正苦于以下问题:C# IAppService类的具体用法?C# IAppService怎么用?C# IAppService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAppService类属于命名空间,在下文中一共展示了IAppService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProjectViewModel

 /// <summary>
 /// Create a new project
 /// </summary>
 public ProjectViewModel(IAppService appService)
 {
     this._AppService = appService;
     Project = new Model.TranslationProject();
     Groups = new ObservableCollection<GroupViewModel>();
     Editors = new ObservableCollection<TranslationEditorViewModel>();
     OpenTranslationCommand = new RelayCommand<TranslationFileViewModel>(
         async file => {
             Exception error = null;
             try
             {
                 await OpenTranslationAsync(file);
             }
             catch (Exception ex)
             {
                 error = ex;
             }
             if (error != null)
                 await _AppService.ShowError(error);
         },
         file => file != null
         );
     CloseEditorCommand = new RelayCommand<TranslationEditorViewModel>(
         async editor => await CloseEditorAsync(editor),
         editor => editor != null
         );
 }
开发者ID:Small-Basic-French,项目名称:SbTranslationHelper,代码行数:30,代码来源:ProjectViewModel.cs

示例2: AppInstaller

 public AppInstaller(IAppService appService, ILog log, IAppLinksService appLinksService,  IRoutes routes)
 {
     _appService = appService;
     _logger = log;
     _appLinksService = appLinksService;
     _routes = routes;
 }
开发者ID:niraltmark,项目名称:PicturesApp,代码行数:7,代码来源:AppInstaller.cs

示例3: EditMenuCommand

			EditMenuCommand(Lazy<IUndoCommandService> undoCommandService, Lazy<IAddUpdatedNodesHelperProvider> addUpdatedNodesHelperProvider, IAppService appService, IPickFilename pickFilename)
				: base(appService.DocumentTreeView) {
				this.undoCommandService = undoCommandService;
				this.addUpdatedNodesHelperProvider = addUpdatedNodesHelperProvider;
				this.appService = appService;
				this.pickFilename = pickFilename;
			}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:MergeWithAssemblyCommand.cs

示例4: CodeCommand

			CodeCommand(Lazy<IUndoCommandService> undoCommandService, Lazy<IAddUpdatedNodesHelperProvider> addUpdatedNodesHelperProvider, IAppService appService, EditCodeVMCreator editCodeVMCreator)
				: base(appService.DocumentTreeView) {
				this.undoCommandService = undoCommandService;
				this.addUpdatedNodesHelperProvider = addUpdatedNodesHelperProvider;
				this.appService = appService;
				this.editCodeVMCreator = editCodeVMCreator;
			}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:AddClassCommands.cs

示例5: Execute

        public ActionResult Execute(IAppService app)
        {
            WebsiteDirectory = FileUtil.MapPath("/");
            FileSystem = app.CompositionService.Resolve<IFileSystemService>();
            Trace = app.CompositionService.Resolve<ITraceService>();
            Factory = app.CompositionService.Resolve<IFactoryService>();

            foreach (var pair in app.Configuration.GetSubKeys("import-website"))
            {
                var key = "import-website:" + pair.Key;

                var databaseName = app.Configuration.GetString(key + ":database");
                if (key == "import-website:exclude-fields")
                {
                    continue;
                }

                if (!string.IsNullOrEmpty(databaseName))
                {
                    ImportItems(app, key);
                }
                else
                {
                    ImportFiles(app, key);
                }
            }

            return null;
        }
开发者ID:Hafeok,项目名称:Sitecore.Pathfinder,代码行数:29,代码来源:ImportWebsite.cs

示例6: MainViewModel

        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        /// 
        /// 
        public MainViewModel(IUserDataRepository userDataRepository,IAppService appService)
        {
            _appService = appService;
            _appService.AuthenticateUser();

            _userDataRepository = userDataRepository;
        }
开发者ID:Mainmatsu,项目名称:App,代码行数:12,代码来源:MainViewModel.cs

示例7: PlayerViewModel

        public PlayerViewModel(IUserDataRepository userDataRepository, IAppService appService)
        {
            _userDataRepository = userDataRepository;
                _appService = appService;

                Messenger.Default.Register<Song>(this, PlayListChange);
        }
开发者ID:Mainmatsu,项目名称:App,代码行数:7,代码来源:PlayerViewModel.cs

示例8: Execute

        public ActionResult Execute(IAppService app)
        {
            TempFolder.EnsureFolder();

            var tempDirectory = Path.Combine(FileUtil.MapPath(TempFolder.Folder), "Pathfinder.Exports");
            if (Directory.Exists(tempDirectory))
            {
                FileUtil.DeleteDirectory(tempDirectory, true);
            }

            Directory.CreateDirectory(tempDirectory);

            var exportFileName = Path.Combine(FileUtil.MapPath(tempDirectory), "Pathfinder.Exports.zip");
            using (var zip = new ZipWriter(exportFileName))
            {
                foreach (var index in app.Configuration.GetSubKeys("write-website-exports"))
                {
                    var entryName = app.Configuration.GetString("write-website-exports:" + index.Key + ":filename");
                    var fileKey = "write-website-exports:" + index.Key + ":";

                    var fileName = Path.Combine(tempDirectory, PathHelper.NormalizeFilePath(entryName).TrimStart('\\'));

                    Directory.CreateDirectory(Path.GetDirectoryName(fileName) ?? string.Empty);

                    WriteFile(app.Configuration, tempDirectory, fileName, fileKey);

                    zip.AddEntry(entryName, fileName);
                }
            }

            return new FilePathResult(exportFileName, "application/zip");
        }
开发者ID:dmositecore,项目名称:Sitecore.Pathfinder,代码行数:32,代码来源:WriteWebsiteExports.cs

示例9: Execute

        public ActionResult Execute(IAppService app)
        {
            TempFolder.EnsureFolder();

            var fileName = FileUtil.MapPath(TempFolder.GetFilename("Pathfinder.Resources.zip"));

            using (var zip = new ZipWriter(fileName))
            {
                foreach (var pair in app.Configuration.GetSubKeys("sync-website:files"))
                {
                    var configKey = "sync-website:files:" + pair.Key + ":";
                    var syncFileName = app.Configuration.GetString(configKey + "file");

                    foreach (var synchronizer in Synchronizers)
                    {
                        if (synchronizer.CanSynchronize(app.Configuration, syncFileName))
                        {
                            synchronizer.Synchronize(app.Configuration, zip, syncFileName, configKey);
                        }
                    }
                }
            }

            return new FilePathResult(fileName, "application/zip");
        }
开发者ID:pveller,项目名称:Sitecore.Pathfinder,代码行数:25,代码来源:SynchronizeWebsite.cs

示例10: Execute

        public ActionResult Execute(IAppService app)
        {
            SerializingDataProvider.Disabled = true;
            try
            {
                foreach (var mapper in PathMapper.WebsiteItemPathToProjectDirectories)
                {
                    DeleteItems(mapper);
                }

                foreach (var mapper in PathMapper.WebsiteDirectoryToProjectDirectories)
                {
                    DeleteFiles(app.ProjectDirectory, mapper);
                }

                var fileSystem = app.CompositionService.Resolve<IFileSystemService>();

                foreach (var pair in app.Configuration.GetSubKeys("reset-website"))
                {
                    var key = "reset-website:" + pair.Key;

                    ResetItems(app, key);
                    ResetFiles(app, fileSystem, key);
                }
            }
            finally
            {
                SerializingDataProvider.Disabled = false;
            }

            return null;
        }
开发者ID:pveller,项目名称:Sitecore.Pathfinder,代码行数:32,代码来源:ResetWebsite.cs

示例11: FriendListViewModel

        public FriendListViewModel(IUserDataRepository userDataRepository, IAppService appService)
        {
            _userDataRepository = userDataRepository;
                _appService = appService;

                SelectionChanged = new RelayCommand(Go);
        }
开发者ID:Mainmatsu,项目名称:App,代码行数:7,代码来源:FriendListViewModel.cs

示例12: Troubleshoot

        public override void Troubleshoot(IAppService app)
        {
            Console.WriteLine(Texts.Rebuilding_indexes___);

            BackgroundJob.Run("Pathfinder Rebuild ContentSearch Indexes", "Indexing", RebuildContentSearchIndexes);
            BackgroundJob.Run("Pathfinder Rebuild Classic Indexes", "Indexing", () => RebuildClassicIndex("master"));
            BackgroundJob.Run("Pathfinder Rebuild Classic Indexes", "Indexing", () => RebuildClassicIndex("core"));
        }
开发者ID:pveller,项目名称:Sitecore.Pathfinder,代码行数:8,代码来源:1000+-+RebuildClassicIndexesTroubleshooter.cs

示例13: AppController

 public AppController(
     IUserService userService, 
     IFormsAuthenticationService formsAuthenticationService, 
     IAppService appService)
     : base(userService, formsAuthenticationService)
 {
     _appService = appService;
 }
开发者ID:Natrixsoftware,项目名称:set-locale,代码行数:8,代码来源:AppController.cs

示例14: PlayListViewModel

        public PlayListViewModel(IUserDataRepository userDataRepository, IAppService appService)
        {
            _userDataRepository = userDataRepository;
            _appService = appService;

            SelectionChanged = new RelayCommand(Go);
            Messenger.Default.Register<PlayList>(this,PlayListChange);
        }
开发者ID:Mainmatsu,项目名称:App,代码行数:8,代码来源:PlayListViewModel.cs

示例15: AuthorizationServerProvider

 public AuthorizationServerProvider(IUserService userService, IAdminUserService adminUserService,
     IAppService appService, ICommandBus commandBus)
 {
     this.userService = userService;
     this.adminUserService = adminUserService;
     this.appService = appService;
     this.commandBus = commandBus;
 }
开发者ID:hoangvv1409,项目名称:codebase,代码行数:8,代码来源:AuthorizationServerProvider.cs


注:本文中的IAppService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。