• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IHost类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: BindingWorkflow

        public BindingWorkflow(IHost host, ConnectionInformation connectionInformation, ProjectInformation project)
        {
            if (host == null)
            {
                throw new ArgumentNullException(nameof(host));
            }

            if (connectionInformation == null)
            {
                throw new ArgumentNullException(nameof(connectionInformation));
            }

            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            this.host = host;
            this.connectionInformation = connectionInformation;
            this.project = project;
            this.projectSystem = this.host.GetService<IProjectSystemHelper>();
            this.projectSystem.AssertLocalServiceIsNotNull();

            this.solutionBindingOperation = new SolutionBindingOperation(
                    this.host,
                    this.connectionInformation,
                    this.project.Key);
        }
开发者ID:SonarSource-VisualStudio,项目名称:sonarlint-visualstudio,代码行数:28,代码来源:BindingWorkflow.cs


示例2: CredentialStore

        public CredentialStore(IPersister persister, IHost host)
        {
            _persister = persister;
            _host = host;

            DefaultRoles = new[] {"Everyone", "Members", "Editors", "Administrators"};
        }
开发者ID:dpawatts,项目名称:zeus,代码行数:7,代码来源:CredentialStore.cs


示例3: Navigator

		public Navigator(IPersister persister, IHost host, VirtualNodeFactory nodes, ContentSource sources)
		{
			this.persister = persister;
			this.host = host;
			this.virtualNodes = nodes;
			this.sources = sources;
		}
开发者ID:nagarjunachallapalli,项目名称:n2cms,代码行数:7,代码来源:Navigator.cs


示例4: DiagnosticController

        public DiagnosticController(IContentItemRepository repository, IHost host, IDefinitionManager definitions,
            ILinkGenerator linkGenerator, IUrlParser parser, DatabaseSection config, IFlushable flushable, IReplicationStorage repstore, 
            IFileSystemFactory fileSystemFactory)
        {
            _repository = repository;
            _host = host;
            _definitions = definitions;
            _linkGenerator = linkGenerator;
            _parser = parser;
            _flushable = flushable;
            _tablePrefix = config.TablePrefix;

            _repstore = repstore;

            if (_forceWriteLockManager != null) return;

            // Create Force Write Lock Manager
            var storageConfig = (FileSystemNamespace) Enum.Parse(typeof (FileSystemNamespace),
                ConfigurationManager.AppSettings["AzureReplicationStorageContainerName"] ??
                "ReplicationStorageDebug");

            var fileSystem = fileSystemFactory.Create(storageConfig);
            _forceWriteLockManager = new ReplicationForceWriteLockManager(fileSystem);
            _writeLockManager = new ReplicationWriteLockManager(fileSystem);
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:25,代码来源:DiagnosticController.cs


示例5: Given_Engine

 private void Given_Engine()
 {
     this.host = mr.Stub<IHost>();
     engine = new OllyLang();
     engine.Host = host;
     engine.Debugger = new Debugger(null);
 }
开发者ID:killbug2004,项目名称:reko,代码行数:7,代码来源:OllyLang.Tests.cs


示例6: DefaultDirectorySelector

		public DefaultDirectorySelector(IHost host, EditSection config)
		{
			this.host = host;
			mode = config.DefaultDirectory.Mode;
			defaultFolderPath = config.DefaultDirectory.RootPath;
			uploadFolders = new List<string>(config.UploadFolders.Folders);
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:7,代码来源:DefaultDirectorySelector.cs


示例7: SelectRootDirectory

        public bool SelectRootDirectory(IHost host, bool force)
        {
            string path = this.RootDirectory;
            string initDir;
            if (String.IsNullOrEmpty(path) || !Directory.Exists(path))
            {
                initDir = null;
            }
            else
            {
                initDir = path;
                if (!force && IsValidDir(initDir))
                {
                    return true;
                }
            }

            path = SimpleDialog.OpenFolder(initDir, "Please specify de4dot's root directory.");
            if (String.IsNullOrEmpty(path) || !Directory.Exists(path)) 
                return false;

            if (!IsValidDir(path)) 
                return false;

            this.RootDirectory = path;
            return true;
        }
开发者ID:adisik,项目名称:simple-assembly-explorer,代码行数:27,代码来源:Plugin.cs


示例8: Edit

 public void Edit(IHost host)
 {
     var editor = host.GetEditor<ClassDiagramEditor>(this, "Edit diagram");
     editor.DiagramNode = this;
     editor.LoadData();
     host.ShowEditor(editor);
 }
开发者ID:attila3453,项目名称:alsing,代码行数:7,代码来源:DiagramElement.cs


示例9: SandboxedHost

 internal SandboxedHost(IHost host, IObjectAccessor accessor, MicroScheduler scheduler)
 {
     m_host = host;
     m_accessor = accessor;
     m_graphics = new SandboxedGraphics(host.Graphics);
     m_scheduler = scheduler;
 }
开发者ID:JohnMcCaffery,项目名称:XMRM,代码行数:7,代码来源:SandboxedHost.cs


示例10: ViewTableContent

        public void ViewTableContent(IHost host)
        {
            try
            {
                //var db = Parent as DataBaseElement;
                //IDbConnection connection = db.GetConnection();
                //IDbCommand command = connection.CreateCommand();
                //command.CommandText = string.Format("select * from [{0}]", Name);
                //connection.Open();
                //IDataReader reader = command.ExecuteReader();


                //var dt = new DataTable();
                //dt.Load(reader);

                //reader.Close();
                //connection.Close();
                //var editor = host.GetEditor<TableDataView>(this, "View Table");
                //editor.Data = dt;
                //host.ShowEditor(editor);
            }
            catch (Exception)
            {
                MessageBox.Show("An error occured");
            }
        }
开发者ID:attila3453,项目名称:alsing,代码行数:26,代码来源:TableElement.cs


示例11: HostManager

 private HostManager(IHost host)
 {
     this.Host = host;
     this.Host.Start += this.HandleHostStart;
     this.Host.IncomingRequestReceived += this.HandleHostIncomingRequestReceived;
     this.Host.IncomingRequestProcessed += this.HandleIncomingRequestProcessed;
 }
开发者ID:endjin,项目名称:openrasta-stable,代码行数:7,代码来源:HostManager.cs


示例12: FileUploadOrDownload

 public FileUploadOrDownload(IHost host, Shell shellData, string sourceFilePath, string targetFilePath)
 {
     _host = host;
     _shellData = shellData;
     _sourceFilePath = sourceFilePath;
     _targetFilePath = targetFilePath;
 }
开发者ID:kevins1022,项目名称:Altman,代码行数:7,代码来源:FileUploadOrDownload.cs


示例13: StringLiteral

        public StringLiteral(IHost host, string value)
            : base(host)
        {
            base.Name = "string";

            if (IsWrappedInQuotes(value))
            {
                ValueType = ValueType.StringLiteral;
                //strip quotes

                int offset = StartsWith(value, '@') ? 2 : 1;
                value = new string(value.ToArray(), offset, value.Length - (offset + 1));
            }
            else if (value == "this")
            {
                ValueType = ValueType.Local;
            }
            else if (value == "null" || value == "true" || value == "false")
            {
                ValueType = ValueType.Keyword;
            }
            else
            {
                ValueType = ValueType.Property;
            }

            if (ValueType == ValueType.StringLiteral)
            {
                Values = Parse(value);
            }
        }
开发者ID:darrelmiller,项目名称:Parrot,代码行数:31,代码来源:StringLiteral.cs


示例14: ActiveSolutionBoundTracker

        public ActiveSolutionBoundTracker(IHost host, IActiveSolutionTracker activeSolutionTracker)
        {
            if (host == null)
            {
                throw new ArgumentNullException(nameof(host));
            }

            if (activeSolutionTracker == null)
            {
                throw new ArgumentNullException(nameof(activeSolutionTracker));
            }

            this.extensionHost = host;
            this.solutionTracker = activeSolutionTracker;

            this.solutionBindingInformationProvider = this.extensionHost.GetService<ISolutionBindingInformationProvider>();
            this.solutionBindingInformationProvider.AssertLocalServiceIsNotNull();

            this.errorListInfoBarController = this.extensionHost.GetService<IErrorListInfoBarController>();
            this.errorListInfoBarController.AssertLocalServiceIsNotNull();
            this.errorListInfoBarController.Refresh();

            // The user changed the binding through the Team Explorer
            this.extensionHost.VisualStateManager.BindingStateChanged += this.OnBindingStateChanged;

            // The solution changed inside the IDE
            this.solutionTracker.ActiveSolutionChanged += this.OnActiveSolutionChanged;

            this.IsActiveSolutionBound = this.solutionBindingInformationProvider.IsSolutionBound();
        }
开发者ID:SonarSource-VisualStudio,项目名称:sonarlint-visualstudio,代码行数:30,代码来源:ActiveSolutionBoundTracker.cs


示例15: Statement

 internal Statement(IHost host)
     : base(host)
 {
     Attributes = new AttributeList(host);
     Children = new StatementList(host);
     Parameters = new ParameterList(host);
 }
开发者ID:darrelmiller,项目名称:Parrot,代码行数:7,代码来源:Statement.cs


示例16: PanelDbManager

        public PanelDbManager(IHost host, PluginParameter data)
        {
			_host = host;
			_shellData = (Shell)data[0];
			_shellSqlConn = GetShellSqlConn();

			// init StrRes to translate string
			StrRes.SetHost(_host);
            Init();			

            //绑定事件
			_dbManager = new DbManager(_host, _shellData, _shellSqlConn.type);
			_dbManager.ConnectDbCompletedToDo += DbManagerConnectDbCompletedToDo;
			_dbManager.GetDbNameCompletedToDo += DbManagerGetDbNameCompletedToDo;
			_dbManager.GetDbTableNameCompletedToDo += DbManagerGetTableNameCompletedToDo;
			_dbManager.GetColumnTypeCompletedToDo += DbManagerGetColumnTypeCompletedToDo;
			_dbManager.ExecuteReaderCompletedToDo += DbManagerExecuteReaderCompletedToDo;
			_dbManager.ExecuteNonQueryCompletedToDo += DbManagerExecuteNonQueryCompletedToDo;

			RefreshServerStatus(false);


	        if (string.IsNullOrEmpty(_shellSqlConn.type) || string.IsNullOrEmpty(_shellSqlConn.conn))
	        {
		        MessageBox.Show("shell's sqlConnection is null or space");
	        }
	        else
	        {
				//连接数据库
				_dbManager.ConnectDb(_shellSqlConn.conn);
	        }
        }
开发者ID:kevins1022,项目名称:Altman,代码行数:32,代码来源:PanelDbManager.cs


示例17: DirectUrlInjector

 public DirectUrlInjector(IHost host, IUrlParser parser, IContentItemRepository repository, IDefinitionManager definitions)
 {
     this.host = host;
     this.parser = parser;
     this.repository = repository;
     this.definitions = definitions;
 }
开发者ID:Biswo,项目名称:n2cms,代码行数:7,代码来源:DirectUrlInjector.cs


示例18: MongoInstallationManager

 public MongoInstallationManager(MongoDatabaseProvider database, IHost host, IPersister persister, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator)
     : base(connectionContext, importer, webContext, persister, activator)
 {
     this.database = database;
     this.host = host;
     this.persister = persister;
 }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:7,代码来源:MongoInstallationManager.cs


示例19: HostManager

 HostManager(IHost host)
 {
     Host = host;
     Host.Start += HandleHostStart;
     Host.IncomingRequestReceived += HandleHostIncomingRequestReceived;
     Host.IncomingRequestProcessed += HandleIncomingRequestProcessed;
 }
开发者ID:rokite,项目名称:openrasta-stable,代码行数:7,代码来源:HostManager.cs


示例20: DocumentView

 public DocumentView(IHost host, IRendererFactory rendererFactory, IDictionary<string, object> documentHost, Document document)
 {
     DocumentHost = documentHost;
     _host = host;
     _rendererFactory = rendererFactory;
     _document = document;
 }
开发者ID:ParrotFx,项目名称:Parrot,代码行数:7,代码来源:DocumentView.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IHostingEnvironment类代码示例发布时间:2022-05-24
下一篇:
C# IHookHelper类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap