// Token: 0x060001BE RID: 446 RVA: 0x00006784 File Offset: 0x00004984
        private void RegisterSoftEngine(RegistrationAttribute.RegistrationContext context)
        {
            string inprocServerPath = context.InprocServerPath;
            string text             = Path.Combine(context.ComponentPath, this.EngineAssemblyFileName);

            using (RegistrationAttribute.Key key = context.CreateKey(string.Format("AD7Metrics\\Engine\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineGuid))))
            {
                key.SetValue("CLSID", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineClassGuid));
                key.SetValue("Name", this.EngineClassName);
                key.SetValue("PortSupplier", RegisterMonoDebuggerAttribute.FormatGuid(this.PortSupplierClassGuid));
                key.SetValue("CallstackBP", 1);
                key.SetValue("AutoselectPriority", 4);
                key.SetValue("Attach", 0);
                key.SetValue("AddressBP", 0);
                key.SetValue("Disassembly", 0);
                key.SetValue("RemotingDebugging", 0);
                key.SetValue("Exceptions", 1);
            }
            using (RegistrationAttribute.Key key2 = context.CreateKey(string.Format("CLSID\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineClassGuid))))
            {
                key2.SetValue("InprocServer32", inprocServerPath);
                key2.SetValue("Class", this.EngineClassName);
                key2.SetValue("CodeBase", text);
                key2.SetValue("Assembly", this.EngineAssemblyName);
            }
        }
        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();
                }
            }
        }
        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);
            }
        }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            try
            {
                context.Log.Write("Registering Csd generator ... ");

                // register class
                Key key    = context.CreateKey(@"CLSID");
                Key subKey = key.CreateSubkey(_generatorClsid);
                subKey.SetValue("ThreadingModel", "Both");
                subKey.SetValue("InprocServer32", Path.Combine(Environment.SystemDirectory, "mscoree.dll"));
                subKey.SetValue("Class", _generatorType.FullName);
                subKey.SetValue("Assembly", _generatorType.Assembly.FullName);
                subKey.Close();
                key.Close();

                // register custom generator
                key    = context.CreateKey(@"Generators\" + CSharpGeneratorsGuid);
                subKey = key.CreateSubkey("CsdFileGenerator");
                subKey.SetValue(string.Empty, "Configuration Section Designer Generator");
                subKey.SetValue("CLSID", _generatorClsid);
                subKey.SetValue("GeneratesDesignTimeSource", 1);
                subKey.Close();
                key.Close();

                key    = context.CreateKey(@"Generators\" + VBGeneratorsGuid);
                subKey = key.CreateSubkey("CsdFileGenerator");
                subKey.SetValue(string.Empty, "Configuration Section Designer Generator");
                subKey.SetValue("CLSID", _generatorClsid);
                subKey.SetValue("GeneratesDesignTimeSource", 1);
                subKey.Close();
                key.Close();

                // register .csd editor notification
                key    = context.CreateKey(@"Projects\" + CSharpProjectGuid + @"\FileExtensions");
                subKey = key.CreateSubkey(".csd");
                subKey.SetValue("EditorFactoryNotify", _editorFactoryGuid);
                subKey.Close();
                key.Close();
                context.Log.WriteLine("Success.");

                key    = context.CreateKey(@"Projects\" + VBProjectGuid + @"\FileExtensions");
                subKey = key.CreateSubkey(".csd");
                subKey.SetValue("EditorFactoryNotify", _editorFactoryGuid);
                subKey.Close();
                key.Close();
                context.Log.WriteLine("Success.");
            }
            catch (Exception e)
            {
                context.Log.WriteLine("Failure: " + e);
            }
        }
Beispiel #5
0
        /// <summary>
        /// Register the custom editor
        /// </summary>
        /// <param name="context"></param>
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            /// Validate parameter input
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            /// Set extension key
            Key extensionKey = context.CreateKey(XmlChooserEditorExtensionsKeyPath);

            extensionKey.SetValue(defaultExtension, xmlChooserPriority);
            extensionKey.Close();

            /// set editor key
            Key editorKey = context.CreateKey(Path.Combine(XmlChooserFactory, keyName));

            editorKey.SetValue("DefaultLogicalView", defaultLogicalView.ToString("B").ToUpperInvariant());
            editorKey.SetValue("Extension", defaultExtension);
            if (!string.IsNullOrWhiteSpace(Namespace))
            {
                editorKey.SetValue("Namespace", Namespace);
            }
            if (MatchExtensionAndNamespace)
            {
                editorKey.SetValue("Match", "both");
            }
            if (IsDataSet.HasValue)
            {
                editorKey.SetValue("IsDataSet", Convert.ToInt32(IsDataSet.Value));
            }
            /// Set DebuggingLogicalViewEditor Mapping
            if (DebuggingLogicalViewEditor != null)
            {
                editorKey.SetValue(VSConstants.LOGVIEWID_Debugging.ToString("B").ToUpperInvariant(), TryGetGuidFromObject(DebuggingLogicalViewEditor).ToString("B").ToUpperInvariant());
            }
            /// Set CodeLogicalViewEditor Mapping
            if (CodeLogicalViewEditor != null)
            {
                editorKey.SetValue(VSConstants.LOGVIEWID_Code.ToString("B").ToUpperInvariant(), TryGetGuidFromObject(CodeLogicalViewEditor).ToString("B").ToUpperInvariant());
            }
            /// Set DesignerLogicalViewEditor Mapping
            if (DesignerLogicalViewEditor != null)
            {
                editorKey.SetValue(VSConstants.LOGVIEWID_Designer.ToString("B").ToUpperInvariant(), TryGetGuidFromObject(DesignerLogicalViewEditor).ToString("B").ToUpperInvariant());
            }
            /// Set TextLogicalViewEditor Mapping
            if (TextLogicalViewEditor != null)
            {
                editorKey.SetValue(VSConstants.LOGVIEWID_TextView.ToString("B").ToUpperInvariant(), TryGetGuidFromObject(TextLogicalViewEditor).ToString("B").ToUpperInvariant());
            }
            editorKey.Close();
        }
Beispiel #6
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (this.Type == null)
     {
         throw new ArgumentNullException("Type");
     }
     if (string.IsNullOrEmpty(this.Name))
     {
         throw new ArgumentNullException("Name");
     }
     if (string.IsNullOrEmpty(this.ProjectSystem))
     {
         throw new ArgumentNullException("ProjectSystem");
     }
     using (RegistrationAttribute.Key key = context.CreateKey("Generators"))
     {
         using (RegistrationAttribute.Key key2 = key.CreateSubkey(this.ProjectSystem))
         {
             using (RegistrationAttribute.Key key3 = key2.CreateSubkey(this.Name))
             {
                 key3.SetValue("", this.Description);
                 key3.SetValue("CLSID", "{" + this.Type.GUID + "}");
                 key3.SetValue("GeneratesDesignTimeSource", this.GeneratesDesignTimeSource ? 1 : 0);
             }
         }
         using (RegistrationAttribute.Key key4 = context.CreateKey("CLSID"))
         {
             using (RegistrationAttribute.Key key5 = key4.CreateSubkey("{" + this.Type.GUID + "}"))
             {
                 key5.SetValue("", this.Description);
                 key5.SetValue("Class", this.Type.FullName);
                 key5.SetValue("InprocServer32", context.InprocServerPath);
                 key5.SetValue("ThreadingModel", "Both");
                 if (context.RegistrationMethod == RegistrationMethod.CodeBase)
                 {
                     key5.SetValue("CodeBase", this.Type.Assembly.CodeBase);
                 }
                 else
                 {
                     key5.SetValue("Assembly", this.Type.Assembly.FullName);
                 }
             }
         }
     }
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideCodeGeneratorAttributeRegisterLog, new object[] { this.Name, this.Type.GUID.ToString() }));
 }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (string.IsNullOrEmpty(this.Name))
     {
         throw new ArgumentNullException("Name");
     }
     if (string.IsNullOrEmpty(this.Extension))
     {
         throw new ArgumentNullException("Extension");
     }
     if (string.IsNullOrEmpty(this.ProjectSystemPackage))
     {
         throw new ArgumentNullException("ProjectSystemPackage");
     }
     if (string.IsNullOrEmpty(this.ProjectSystem))
     {
         throw new ArgumentNullException("ProjectSystem");
     }
     using (RegistrationAttribute.Key key = context.CreateKey("Generators"))
     {
         using (RegistrationAttribute.Key key2 = key.CreateSubkey(this.ProjectSystemPackage))
         {
             using (RegistrationAttribute.Key key3 = key2.CreateSubkey(this.Extension))
             {
                 key3.SetValue(string.Empty, this.Name);
             }
         }
     }
     if (StringComparer.OrdinalIgnoreCase.Compare(this.ProjectSystem, "{E24C65DC-7377-472b-9ABA-BC803B73C61A}") == 0)
     {
         using (RegistrationAttribute.Key key4 = context.CreateKey("Projects"))
         {
             using (RegistrationAttribute.Key key5 = key4.CreateSubkey(this.ProjectSystem))
             {
                 using (RegistrationAttribute.Key key6 = key5.CreateSubkey("FileExtensions"))
                 {
                     using (RegistrationAttribute.Key key7 = key6.CreateSubkey(this.Extension))
                     {
                         key7.SetValue("CustomTool", this.Name);
                     }
                 }
             }
         }
     }
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideCodeGeneratorExtensionAttributeRegisterLog, new object[] { this.Name, this.Extension }));
 }
Beispiel #8
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            AssemblyName name = typeof(Ankh.VS.VSVersionThunk).Assembly.GetName();

            using (Key key = context.CreateKey(GetKey()))
            {
                key.SetValue("name", name.Name);
                key.SetValue("culture", "neutral");
                key.SetValue("publicKeyToken", TokenToString(name.GetPublicKeyToken()));
                key.SetValue("version", name.Version);
                if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
                {
                    string dllName = name.Name + "-V4.dll";

                    if (!context.GetType().FullName.Contains("Ankh"))
                    {
                        dllName = name.Name + ".dll"; // Doesn't work in debug mode at this time
                    }
                    key.SetValue("codeBase", Path.Combine("$PackageFolder$", dllName));
                }
                else
                {
                    key.SetValue("codeBase", "[#CF_" + name.Name + ".V4.dll" + "]");
                }
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            using (var regKey = context.CreateKey(GetParentKey()))
            {
                RegisterWithKey(regKey, regKey.GetType());
            }
        }
Beispiel #10
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key serviceKey = context.CreateKey(LanguageServicesKeyName))
     {
         serviceKey.SetValue("ShowBraceCompletion", (int)1);
     }
 }
Beispiel #11
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            using (RegistrationAttribute.Key regKey = context.CreateKey(CLSIDKey))
            {
                RegisterWithKey(regKey, regKey.GetType(), context.InprocServerPath, context.CodeBase);
            }
        }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (RegistrationAttribute.Key key = context.CreateKey(RegKey))
     {
         key.SetValue("ShowBraceCompletion", _enableCompletion ? 1 : 0);
     }
 }
Beispiel #13
0
        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));
            }
        }
Beispiel #14
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            bool flag = false;

            RegistrationAttribute.Key key = context.CreateKey("AutomationProperties");
            if (key != null)
            {
                RegistrationAttribute.Key key2 = key.CreateSubkey(this.Category);
                if (key2 != null)
                {
                    RegistrationAttribute.Key key3 = key2.CreateSubkey(this.Subcategory);
                    if (key3 != null)
                    {
                        key3.SetValue("Name", this.Category + "." + this.Subcategory);
                        key3.SetValue("Package", "{" + context.ComponentType.GUID.ToString() + "}");
                        flag = true;
                    }
                }
            }
            if (flag)
            {
                context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideAutomationPropertiesLogRegistered, new object[] { this.Category, this.Subcategory }));
            }
        }
 /// <summary>
 /// </summary>
 /// <param name="context"></param>
 /// <devdoc>
 /// Called to register this attribute with the given context.  The context
 /// contains the location where the registration information should be placed.
 /// It also contains such as the type being registered, and path information.
 /// This method is called both for registration and unregistration.  The difference is
 /// that unregistering just uses a hive that reverses the changes applied to it.
 /// </devdoc>
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(RegistryPath))
     {
         key.SetValue(Theme, flags);
     }
 }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (RegistrationAttribute.Key key = context.CreateKey(RegKey))
     {
         key.SetValue(_fileExtension, "");
     }
 }
Beispiel #17
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            // Write to the context's log what we are about to do
            context.Log.WriteLine(String.Format(CultureInfo.CurrentCulture,
                                                "Issue Repository Connector:\t\t{0}\n", RegName));

            // Declare the issue repository connector, its name, the provider's service
            using (Key connectors = context.CreateKey(REG_KEY_CONNECTORS))
            {
                using (Key connectorKey = connectors.CreateSubkey(RegGuid.ToString("B").ToUpperInvariant()))
                {
                    connectorKey.SetValue("", RegName);
                    connectorKey.SetValue(REG_VALUE_SERVICE, IssueRepositoryConnectorService.ToString("B").ToUpperInvariant());

                    using (Key connectorNameKey = connectorKey.CreateSubkey(REG_KEY_NAME))
                    {
                        connectorNameKey.SetValue("", UIName);
                        connectorNameKey.SetValue(REG_VALUE_PACKAGE, UINamePkg.ToString("B").ToUpperInvariant());

                        connectorNameKey.Close();
                    }
                    connectorKey.Close();
                }
                connectors.Close();
            }
        }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            Key key = context.CreateKey("BizTalkBindingToolDb");

            key.SetValue("GenerateBindings", this._generateBindings);
            key.SetValue("Server", this._bizTalkBindingToolDbServer);
            key.SetValue("Database", this._bizTalkBindingToolDbDatabase);
        }
Beispiel #19
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            Key markerkey = context.CreateKey("Text Editor\\External Markers\\{" + _markerGUID + "}");

            markerkey.SetValue("", _markerName);
            markerkey.SetValue("Service", "{" + _markerProviderGUID + "}");
            markerkey.SetValue("DisplayName", "My Custom Text Marker");
            markerkey.SetValue("Package", "{" + context.ComponentType.GUID + "}");
        }
Beispiel #20
0
 public void Register(RegistrationAttribute.RegistrationContext context)
 {
     foreach (var regKey in _keys)
     {
         using (var key = context.CreateKey(regKey.Key)) {
             Register(context, key, regKey);
         }
     }
 }
        // Token: 0x060001BC RID: 444 RVA: 0x00006660 File Offset: 0x00004860
        private void RegisterCommon(RegistrationAttribute.RegistrationContext context)
        {
            string inprocServerPath = context.InprocServerPath;
            string text             = Path.Combine(context.ComponentPath, this.EngineAssemblyFileName);

            using (RegistrationAttribute.Key key = context.CreateKey(string.Format("AD7Metrics\\PortSupplier\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.PortSupplierGuid))))
            {
                key.SetValue("CLSID", RegisterMonoDebuggerAttribute.FormatGuid(this.PortSupplierClassGuid));
                key.SetValue("Name", this.DebuggerName);
            }
            using (RegistrationAttribute.Key key2 = context.CreateKey(string.Format("CLSID\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.PortSupplierClassGuid))))
            {
                key2.SetValue("InprocServer32", inprocServerPath);
                key2.SetValue("Class", this.PortSupplierClassName);
                key2.SetValue("CodeBase", text);
                key2.SetValue("Assembly", this.EngineAssemblyName);
            }
        }
Beispiel #22
0
 /// <summary>
 /// </summary>
 /// <param name="context"></param>
 /// <devdoc>
 /// Called to register this attribute with the given context.  The context
 /// contains the location where the registration information should be placed.
 /// It also contains such as the type being registered, and path information.
 /// This method is called both for registration and unregistration.  The difference is
 /// that unregistering just uses a hive that reverses the changes applied to it.
 /// </devdoc>
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(RegistryPath))
     {
         key.SetValue("", RegName);
         key.SetValue("Service", _providerType.GUID.ToString("B"));
         key.SetValue("Package", PackageGuid.ToString("B"));
         key.SetValue("DisplayName", DisplayName);
     }
 }
Beispiel #23
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(KeyName))
     {
         if (!string.IsNullOrEmpty(Name))
         {
             key.SetValue("", Name);
         }
         key.SetValue("flags", (int)_flags);
     }
 }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key pageKey = context.CreateKey(pageRegKey))
     {
         pageKey.SetValue(string.Empty, string.Empty);
         pageKey.SetValue("AddToMru", 1);
         pageKey.SetValue("ComponentType", ".NET Assembly");
         pageKey.SetValue("Package", packageGuid.ToString("B"));
         pageKey.SetValue("Page", pageGuid.ToString("B"));
         pageKey.SetValue("Sort", 0x35);
     }
 }
Beispiel #25
0
 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"));
         key.SetValue("ResourcePackage", UINamePkg.ToString("B"));
         key.SetValue("ProfileSave", 1);
     }
 }
Beispiel #26
0
        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();
                }
            }
        }
        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);
        }
Beispiel #28
0
        /// <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));
        }
Beispiel #29
0
 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]");
         }
     }
 }
Beispiel #30
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            var engineKey = context.CreateKey("AD7Metrics\\Exception\\" + this._engineGuid);

            var key = engineKey.CreateSubkey(this._category);

            foreach (var pathElem in this._path)
            {
                key = key.CreateSubkey(pathElem);
            }
            key.SetValue("Code", this._code);
            key.SetValue("State", (int)this._state);

            var name = this._path.LastOrDefault() ?? "*";

            engineKey.SetValue(name, (int)(this._state & DkmValidFlags));
        }