本文整理汇总了C#中IHost类的典型用法代码示例。如果您正苦于以下问题:C# IHost类的具体用法?C# IHost怎么用?C# IHost使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IHost类属于命名空间,在下文中一共展示了IHost类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: CredentialStore
public CredentialStore(IPersister persister, IHost host)
{
_persister = persister;
_host = host;
DefaultRoles = new[] {"Everyone", "Members", "Editors", "Administrators"};
}
示例3: Navigator
public Navigator(IPersister persister, IHost host, VirtualNodeFactory nodes, ContentSource sources)
{
this.persister = persister;
this.host = host;
this.virtualNodes = nodes;
this.sources = sources;
}
示例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);
}
示例5: Given_Engine
private void Given_Engine()
{
this.host = mr.Stub<IHost>();
engine = new OllyLang();
engine.Host = host;
engine.Debugger = new Debugger(null);
}
示例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);
}
示例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;
}
示例8: Edit
public void Edit(IHost host)
{
var editor = host.GetEditor<ClassDiagramEditor>(this, "Edit diagram");
editor.DiagramNode = this;
editor.LoadData();
host.ShowEditor(editor);
}
示例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;
}
示例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");
}
}
示例11: HostManager
private HostManager(IHost host)
{
this.Host = host;
this.Host.Start += this.HandleHostStart;
this.Host.IncomingRequestReceived += this.HandleHostIncomingRequestReceived;
this.Host.IncomingRequestProcessed += this.HandleIncomingRequestProcessed;
}
示例12: FileUploadOrDownload
public FileUploadOrDownload(IHost host, Shell shellData, string sourceFilePath, string targetFilePath)
{
_host = host;
_shellData = shellData;
_sourceFilePath = sourceFilePath;
_targetFilePath = targetFilePath;
}
示例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);
}
}
示例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);
}