本文整理汇总了C#中Microsoft.VisualStudio.Shell.RegistrationAttribute类的典型用法代码示例。如果您正苦于以下问题:C# RegistrationAttribute类的具体用法?C# RegistrationAttribute怎么用?C# RegistrationAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RegistrationAttribute类属于Microsoft.VisualStudio.Shell命名空间,在下文中一共展示了RegistrationAttribute类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Register
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public override void Register (RegistrationAttribute.RegistrationContext context)
{
using (RegistrationAttribute.Key regKey = context.CreateKey (GetParentKey ()))
{
RegisterWithKey (regKey, regKey.GetType ());
}
}
开发者ID:ashumeow,项目名称:android-plus-plus,代码行数:11,代码来源:ProvideDebugBaseAttribute.cs
示例2: Register
public void Register(RegistrationAttribute.RegistrationContext context) {
foreach (var regKey in _keys) {
using (var key = context.CreateKey(regKey.Key)) {
Register(context, key, regKey);
}
}
}
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:7,代码来源:RegistrationAttributeBuilder.cs
示例3: Register
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public override void Register (RegistrationAttribute.RegistrationContext context)
{
using (RegistrationAttribute.Key regKey = context.CreateKey (CLSIDKey))
{
RegisterWithKey (regKey, regKey.GetType (), context.InprocServerPath, context.CodeBase);
}
}
开发者ID:ashumeow,项目名称:android-plus-plus,代码行数:11,代码来源:ProvideExternObjectAttribute.cs
示例4: Unregister
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
context.RemoveValue(string.Format(SupportedTestTypesKey, _hostAdapterName), _testTypeGuid);
context.RemoveKeyIfEmpty(string.Format(SupportedTestTypesKey, _hostAdapterName));
context.RemoveValue(string.Format(SupportedHostAdaptersKey, _testTypeGuid), _hostAdapterName);
context.RemoveKeyIfEmpty(string.Format(SupportedHostAdaptersKey, _testTypeGuid));
}
开发者ID:OmerRaviv,项目名称:VisualStudio-TestHost,代码行数:8,代码来源:RegisterSupportedTestTypeAttribute.cs
示例5: Register
public override void Register(RegistrationAttribute.RegistrationContext context) {
var engineKey = context.CreateKey("AD7Metrics\\Exception\\" + _engineGuid);
var key = engineKey;
foreach (var pathElem in _path) {
key = key.CreateSubkey(pathElem);
}
key.SetValue("Code", _code);
key.SetValue("State", (int)_state);
}
开发者ID:whuthj,项目名称:VisualRust,代码行数:10,代码来源:ProvideDebugExceptionAttribute.cs
示例6: Register
public override void Register(RegistrationAttribute.RegistrationContext context)
{
using (var key = context.CreateKey(string.Format(SupportedTestTypesKey, _hostAdapterName))) {
key.SetValue(_testTypeGuid, _testTypeName);
}
using (var key = context.CreateKey(string.Format(SupportedHostAdaptersKey, _testTypeGuid))) {
key.SetValue(_hostAdapterName, _hostAdapterDisplayName);
}
}
开发者ID:OmerRaviv,项目名称:VisualStudio-TestHost,代码行数:10,代码来源:RegisterSupportedTestTypeAttribute.cs
示例7: Register
public override void Register(RegistrationAttribute.RegistrationContext context)
{
// Create the visibility key.
using (Key childKey = context.CreateKey(GetPath(context)))
{
// Set the value for the command UI guid.
if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
childKey.SetValue(RemapName, new System.Reflection.AssemblyName(context.ComponentType.Assembly.FullName).Version.ToString());
else
childKey.SetValue(RemapName, "[ProductVersion]");
}
}
开发者ID:pvginkel,项目名称:VisualGit,代码行数:12,代码来源:ProvideUIVersion.cs
示例8: Register
public override void Register(RegistrationAttribute.RegistrationContext context)
{
using (Key key = context.CreateKey(GetKey(_key)))
{
key.SetValue("", _exportName);
key.SetValue("Description", string.Format("#{0}", _desc));
key.SetValue("Name", _name);
key.SetValue("Package", UINamePkg.ToString("B").ToUpperInvariant());
key.SetValue("ResourcePackage", UINamePkg.ToString("B").ToUpperInvariant());
key.SetValue("ProfileSave", 1);
//key.SetValue("ResourcePackage", UINamePkg.ToString("B").ToUpperInvariant());
}
}
开发者ID:pvginkel,项目名称:VisualGit,代码行数:13,代码来源:ProvideLanguageSettings.cs
示例9: Register
public override void Register(RegistrationAttribute.RegistrationContext context) {
var engineKey = context.CreateKey("AD7Metrics\\Exception\\" + _engineGuid);
var key = engineKey.CreateSubkey(_category);
foreach (var pathElem in _path) {
key = key.CreateSubkey(pathElem);
}
key.SetValue("Code", _code);
key.SetValue("State", (int)_state);
string name = _path.LastOrDefault() ?? "*";
engineKey.SetValue(name, (int)(_state & DkmValidFlags));
}
开发者ID:bnavarma,项目名称:ScalaTools,代码行数:13,代码来源:ProvideDebugExceptionAttribute.cs
示例10: Register
public override void Register(RegistrationAttribute.RegistrationContext context)
{
Key packageKey = null, packageProviderRef = null, packageProvider = null;
try
{
packageKey = context.CreateKey(@"DataSources\{" + dataSourceGuid + @"}");
packageKey.SetValue("", dataSourceName);
packageKey.SetValue("DefaultProvider", @"{" + dataProviderGuid + @"}");
packageProviderRef = packageKey.CreateSubkey(@"SupportingProviders\{"+ dataProviderGuid + @"}");
packageProviderRef.SetValue("DisplayName", "Provider_Label, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
packageProviderRef.SetValue("Description", "Provider_Help, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
packageProvider = context.CreateKey(@"DataProviders\{" + dataProviderGuid + @"}");
packageProvider.SetValue("", dataProviderName);
packageProvider.SetValue("Description", "Provider_Description, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
packageProvider.SetValue("DisplayName", "Provider_DisplayName, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
packageProvider.SetValue("ShortDisplayName", "Provider_ShortDisplayName, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
//packageProvider.SetValue("CodeBase", context.CodeBase);
packageProvider.SetValue("InvariantName", "NuoDb.Data.Client");
//packageProvider.SetValue("RuntimeInvariantName", "System.Data.SqlServerCe.3.5");
packageProvider.SetValue("Technology", "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}");
packageProvider.SetValue("FactoryService", "{" + factoryGuid + "}");
//packageProvider.SetValue("AssociatedSource", "{" + dataSourceGuid + "}");
//packageProvider.SetValue("PlatformVersion", "1.0");
packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionProperties").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionProperties");
packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionSupport");
packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionUIControl").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionUIControl");
packageProvider.CreateSubkey(@"SupportedObjects\DataViewSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataViewSupport");
packageProvider.CreateSubkey(@"SupportedObjects\DataObjectSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataObjectSupport");
packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionPromptDialog");
packageProvider.CreateSubkey(@"SupportedObjects\DataSourceSpecializer");
packageProvider.CreateSubkey(@"SupportedObjects\Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataConnectionUIConnector");
packageProvider.CreateSubkey(@"SupportedObjects\Microsoft.VisualStudio.Data.Core.IVsDataProviderDynamicSupport");
}
finally
{
if (packageKey != null)
packageKey.Close();
if (packageProviderRef != null)
packageProviderRef.Close();
if (packageProvider != null)
packageProvider.Close();
}
}
开发者ID:helluvamatt,项目名称:nuodb-dotnet,代码行数:49,代码来源:ProvideDataSourceAttribute.cs
示例11: Unregister
private void Unregister(RegistrationAttribute.RegistrationContext context, string prefix, RegKey regKey) {
prefix += "\\" + regKey.Key;
foreach (var registrySubKey in regKey.SubKeys) {
Unregister(context, prefix, registrySubKey);
}
foreach (var value in regKey.Values) {
context.RemoveValue(prefix, value.Key);
}
if (regKey.Package != null) {
context.RemoveValue(prefix, regKey.Package);
}
}
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:15,代码来源:RegistrationAttributeBuilder.cs
示例12: Register
/// <summary>
/// Called to register this attribute with the given context. The context
/// contains the location where the registration information should be placed.
/// It also contains other information such as the type being registered and path information.
/// </summary>
/// <param name="context">Given context to register in</param>
public override void Register(RegistrationAttribute.RegistrationContext context) {
if (context == null) {
throw new ArgumentNullException("context");
}
using (Key key = context.CreateKey(String.Format(CultureInfo.InvariantCulture, "{0}\\{1}",
ToolboxControlsInstallerPath,
context.ComponentType.Assembly.FullName))) {
key.SetValue(String.Empty, this.Name);
key.SetValue("Codebase", context.CodeBase);
if (this.IsWpfControls) {
key.SetValue("WPFControls", "1");
}
}
}
开发者ID:hintofherring,项目名称:RoboUtes-2014,代码行数:22,代码来源:ProvideToolboxControlAttribute.cs
示例13: Register
public override void Register(RegistrationAttribute.RegistrationContext context) {
var engineKey = context.CreateKey("AD7Metrics\\Exception\\" + _engineGuid);
var key = engineKey.CreateSubkey(_category);
foreach (var pathElem in _path) {
key = key.CreateSubkey(pathElem);
}
key.SetValue("Code", _code);
key.SetValue("State", (int)_state);
// Debug engine load time can be improved by writing the exception category default
// stop setting and exceptions to the default settings at the exception category reg
// key node. This improves debug engine load time by getting necessary exception stop
// settings for the entire category without having to enumerate the entire category
// hive structure when loading the debug engine.
string name = _path.LastOrDefault();
if (name == null || !BreakByDefault) {
engineKey.SetValue(name ?? "*", (int)(_state & DkmValidFlags));
}
}
开发者ID:RussBaz,项目名称:PTVS,代码行数:20,代码来源:ProvideDebugExceptionAttribute.cs
示例14: Register
/// <summary>
/// Register this generator
/// </summary>
/// <param name="context"></param>
public override void Register(RegistrationAttribute.RegistrationContext context)
{
Guard.NotNull(() => context, context);
using (RegistrationAttribute.Key generatorsKey = context.CreateKey(@"Generators"))
{
using (RegistrationAttribute.Key projectSystemKey = generatorsKey.CreateSubkey(this.ProjectSystem))
using (RegistrationAttribute.Key generatorKey = projectSystemKey.CreateSubkey(this.Name))
{
generatorKey.SetValue(string.Empty, this.Description);
generatorKey.SetValue(@"CLSID", @"{" + this.Type.GUID + @"}");
generatorKey.SetValue(@"GeneratesDesignTimeSource", Convert.ToInt32(this.GeneratesDesignTimeSource));
}
using (RegistrationAttribute.Key clsIdKey = context.CreateKey(@"CLSID"))
using (RegistrationAttribute.Key registrationKey = clsIdKey.CreateSubkey(@"{" + this.Type.GUID + @"}"))
{
registrationKey.SetValue(string.Empty, this.Description);
registrationKey.SetValue(@"Class", this.Type.FullName);
registrationKey.SetValue(@"InprocServer32", context.InprocServerPath);
registrationKey.SetValue(@"ThreadingModel", @"Both");
if (context.RegistrationMethod == RegistrationMethod.CodeBase)
{
var fileName = Path.GetFileName(this.Type.Assembly.CodeBase);
registrationKey.SetValue(@"CodeBase", Path.Combine(context.ComponentPath, fileName));
}
else
{
registrationKey.SetValue(@"Assembly", this.Type.Assembly.FullName);
}
}
}
context.Log.WriteLine(string.Format(
CultureInfo.CurrentCulture,
Resources.ProvideCodeGeneratorAttribute_RegisterLog,
this.Name,
this.Type.GUID));
}
开发者ID:NuPattern,项目名称:NuPattern,代码行数:43,代码来源:ProvideCodeGeneratorAttribute.cs
示例15: Register
public override void Register(RegistrationAttribute.RegistrationContext context)
{
Key providerKey = null;
try
{
providerKey = context.CreateKey(@"DataProviders\{" + GuidList.guidNpgsqlDdexProviderDataProviderString + @"}");
providerKey.SetValue(null, ".NET Framework Data Provider for PostgreSQL");
providerKey.SetValue("AssociatedSource", "{" + GuidList.guidNpgsqlDdexProviderDataSourceString + "}");
providerKey.SetValue("Description", "Provider_Description, " + this.GetType().Namespace + ".Resources, NpgsqlDdexProvider");
providerKey.SetValue("DisplayName", "Provider_DisplayName, " + this.GetType().Namespace + ".Resources, NpgsqlDdexProvider");
providerKey.SetValue("FactoryService", "{" + GuidList.guidNpgsqlDdexProviderObjectFactoryString + "}");
providerKey.SetValue("InvariantName", "Npgsql");
providerKey.SetValue("PlatformVersion", "2.0");
providerKey.SetValue("ShortDisplayName", "Provider_ShortDisplayName, " + this.GetType().Namespace + ".Resources, NpgsqlDdexProvider");
providerKey.SetValue("Technology", "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}");
providerKey = providerKey.CreateSubkey("SupportedObjects");
providerKey.CreateSubkey(typeof(IVsDataConnectionProperties).Name);
providerKey.CreateSubkey(typeof(IVsDataConnectionUIProperties).Name);
providerKey.CreateSubkey(typeof(IVsDataConnectionSupport).Name);
providerKey.CreateSubkey(typeof(IVsDataObjectSupport).Name);
providerKey.CreateSubkey(typeof(IVsDataViewSupport).Name);
providerKey = context.CreateKey(@"DataSources\{" + GuidList.guidNpgsqlDdexProviderDataSourceString + @"}");
providerKey.SetValue(null, "PostgreSQL Database");
providerKey.SetValue("DefaultProvider", "{" + GuidList.guidNpgsqlDdexProviderDataProviderString + "}");
providerKey = providerKey.CreateSubkey("SupportingProviders");
providerKey = providerKey.CreateSubkey("{" + GuidList.guidNpgsqlDdexProviderDataProviderString + "}");
providerKey.SetValue("Description", "Provider_Description, " + this.GetType().Namespace + ".Resources, NpgsqlDdexProvider");
providerKey.SetValue("DisplayName", "Provider_DisplayName, " + this.GetType().Namespace + ".Resources, NpgsqlDdexProvider");
}
finally
{
if (providerKey != null)
providerKey.Close();
}
}
开发者ID:CarlosSolrac,项目名称:npgsql,代码行数:37,代码来源:NpgsqlDataProviderRegistration.cs
示例16: Unregister
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public override void Unregister (RegistrationAttribute.RegistrationContext context)
{
context.RemoveKey (CLSIDKey);
}
开发者ID:bleissem,项目名称:android-plus-plus,代码行数:8,代码来源:ProvideExternObjectAttribute.cs
示例17: Unregister
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
ProvideObjectAttribute objectProvider = new ProvideObjectAttribute(context.ComponentType);
objectProvider.Unregister(context);
}
开发者ID:vairam-svs,项目名称:poshtools,代码行数:5,代码来源:RegistrationAttributes.cs
示例18: Register
/// <summary>Provides registration information about a VSPackage when called by an external registration tool such as regpkg.exe.</summary>
/// <param name="context">A registration context provided by an external registration tool. The context can be used to create registry keys, log registration activity, and obtain information about the component being registered. </param>
public override void Register(RegistrationAttribute.RegistrationContext context)
{
#if DEBUG
Console.WriteLine("Registering AsmHighlighter Expression Evaluator");
#endif
if (context == null) return;
using (Key rk = context.CreateKey(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}\\{1:B}", LanguageGuid, vendorGuid)))
{
rk.SetValue("CLSID", Type.GUID.ToString("B"));
rk.SetValue("Language", "ASM Language");
rk.SetValue("Name", "AsmHighlighter");
using (Key rk2 = rk.CreateSubkey("Engine"))
{
rk2.SetValue("0", guidCOMPlusOnlyEng.ToString("B"));
rk2.SetValue("1", guidCOMPlusNativeEng.ToString("B"));
rk2.SetValue("2", guidNativeOnlyEng.ToString("B"));
}
}
}
开发者ID:Trass3r,项目名称:AsmHighlighter,代码行数:21,代码来源:RegisterExpressionEvaluatorAttribute.cs
示例19: Unregister
/// <summary>Removes registration information about a VSPackage when called by an external registration tool such as regpkg.exe.</summary>
/// <param name="context">A registration context provided by an external registration tool. The context can be used to remove registry keys, log registration activity, and obtain information about the component being registered. </param>
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
if (context == null) return;
#if DEBUG
Console.WriteLine("Unregistering AsmHighlighter Expression Evaluator");
#endif
context.RemoveKey(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}\\{1:B}", languageGuid, vendorGuid));
context.RemoveKeyIfEmpty(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}", languageGuid));
}
开发者ID:Trass3r,项目名称:AsmHighlighter,代码行数:11,代码来源:RegisterExpressionEvaluatorAttribute.cs
示例20: Unregister
/// <include file='doc\ProvideLanguageCodeExpansionAttribute.uex' path='docs/doc[@for="ProvideLanguageCodeExpansionAttribute.Unregister"]' />
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
context.RemoveKey(LanguageRegistryKey);
}
开发者ID:Graham-Pedersen,项目名称:IronPlot,代码行数:5,代码来源:ProvideLanguageCodeExpansionAttribute.cs
注:本文中的Microsoft.VisualStudio.Shell.RegistrationAttribute类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论