Exemplo n.º 1
0
        public static RegKey GetEFIngresProviderKey()
        {
            var key = new RegKey("EFIngresProvider", new
            {
                _ = DeployUtils.GetDeployDir()
            });

            return(key);
        }
Exemplo n.º 2
0
        private static void GacInstall(string assemblyFileName)
        {
            var assemblyPath = DeployUtils.GetAssemblyPath(assemblyFileName);

            ConsoleLog.WriteLine("Installing {0} to GAC", Path.GetFileName(assemblyPath));
            using (ConsoleLog.Indent())
            {
                ConsoleLog.WriteLine("Path: {0}", assemblyPath);
                GacUtil.InstallAssembly(assemblyPath, true);
            }
        }
Exemplo n.º 3
0
        private static RegKey _getDataProviderKey()
        {
            // The root registry key for the DDEX provider uniquely identifies the
            // provider, supplies various names, and registers the main assembly that
            // implements the provider using a code base.  It also associates the provider
            // with a runtime data technology (ADO .NET) and a specific ADO .NET provider.
            // Finally, it identifies the default DDEX data source associated with this
            // provider, allowing an implicit IVsDataSourceSpecializer support entity
            // implementation to be supplied by the DDEX runtime.
            var key = new RegKey(DataProviderGUID, new
            {
                _ = "EFIngresDDEXProvider",
                AssociatedSource = DataSourceGUID,
                Codebase         = DeployUtils.GetAssemblyPath("EFIngresDDEXProvider.dll"),
                Description      = "Provider_Description = EFIngresDDEXProvider.Properties.Resources",
                DisplayName      = "Provider_DisplayName = EFIngresDDEXProvider.Properties.Resources",
                InvariantName    = "EFIngresProvider",
                PlatformVersion  = "4.0",
                ShortDisplayName = "Provider_ShortDisplayName = EFIngresDDEXProvider.Properties.Resources",
                Technology       = "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}",
            });

            // The SupportedObjects registry key allows a provider to specify which set of
            // DDEX support entities it supports in a declarative fashion.  This allows the
            // DDEX runtime to query capabilities of the provider without actually loading
            // it.  The set of support entities currently includes those that can be created
            // as standalone objects such as the IVsDataConnectionProperties support entity,
            // and also those support entities that represent connection services, such as
            // the IVsDataCommand support entity.
            var supportedObjectsKey = key.AddSubKey("SupportedObjects");

            // This registry key indicates the existence of an IDSRefBuilder connection
            // service implementation from the DDEX Framework assembly.  The default value
            // is simply the full name of the type in the assembly that provides the
            // implementation.  Since this is not in the main provider assembly, an
            // Assembly value is used to qualify the type.
            var iDSRefBuilder = supportedObjectsKey.AddSubKey("IDSRefBuilder", new
            {
                _        = "Microsoft.VisualStudio.Data.Framework.DSRefBuilder",
                Assembly = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            });

            // This registry key indicates the existence of an IVsDataAsyncCommand
            // connection service implementation that is built into the service provider
            // implemented as part of the AdoDotNetConnectionSupport implementation.  Given
            // that this is the case, the implementation does not need to be specified here.
            supportedObjectsKey.AddSubKey("IVsDataAsyncCommand");
            supportedObjectsKey.AddSubKey("IVsDataCommand");

            // This registry key indicates the existence of an IVsDataConnectionProperties
            // support entity implementation from the main assembly.  The DDEX Framework
            // assembly contains a number of base implementations of support entities for
            // DDEX providers based on a runtime ADO .NET provider; in this case, the
            // connection properties object is implemented in terms of an underlying
            // DbConnectionStringBuilder object supplied by the ADO .NET provider.
            supportedObjectsKey.AddSubKey("IVsDataConnectionProperties", new
            {
                _        = "Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionProperties",
                Assembly = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            });
            supportedObjectsKey.AddSubKey("IVsDataConnectionSupport", new
            {
                _        = "Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionSupport",
                Assembly = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            });
            supportedObjectsKey.AddSubKey("IVsDataConnectionUIProperties", new
            {
                _        = "Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetConnectionProperties",
                Assembly = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            });
            supportedObjectsKey.AddSubKey("IVsDataMappedObjectConverter");
            supportedObjectsKey.AddSubKey("IVsDataObjectIdentifierConverter");

            // This registry key indicates the existence of an
            // IVsDataObjectIdentifierResolver connection service implementation that is
            // customized by this provider.  The default value is simply the full name of
            // the type in the main provider assembly.
            supportedObjectsKey.AddSubKey("IVsDataObjectIdentifierResolver", new
            {
                _ = "EFIngresDDEXProvider.EFIngresIdentifierResolver"
            });
            supportedObjectsKey.AddSubKey("IVsDataObjectMemberComparer");
            supportedObjectsKey.AddSubKey("IVsDataObjectSelector", new
            {
                _ = "EFIngresDDEXProvider.EFIngresObjectSelector"
            });

            // This registry key indicates the existence of an IVsDataObjectSupport
            // connection service implementation.  In this sample, a base implementation
            // from the DDEX Framework assembly is used that can be constructed given the
            // name of a resource and an assembly that contains an XML stream.  The DDEX
            // runtime reads the XmlResource and Assembly registry values and calls the
            // constructor with these values.
            supportedObjectsKey.AddSubKey("IVsDataObjectSupport", new
            {
                _           = "Microsoft.VisualStudio.Data.Framework.DataObjectSupport",
                Assembly    = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
                XmlResource = "EFIngresDDEXProvider.EFIngresObjectSupport"
            });

            // This registry key indicates the existence of an IVsDataSourceInformation
            // connection service implementation that is customized by this provider.  The
            // custom code does not, however, supply all the key/value pairs; most are
            // specified here for flexibility and are merged in by the DDEX runtime.
            supportedObjectsKey.AddSubKey("IVsDataSourceInformation", new
            {
                _ = "EFIngresDDEXProvider.EFIngresSourceInformation",
                SupportsAnsi92Sql             = "True",
                SupportsQuotedIdentifierParts = "True",
                IdentifierOpenQuote           = "\"",
                IdentifierCloseQuote          = "\"",
                ServerSeparator       = ".",
                CatalogSupported      = "True",
                CatalogSupportedInDml = "True",
                SchemaSupported       = "True",
                SchemaSupportedInDml  = "True",
                SchemaSeparator       = ".",
                ParameterPrefix       = "@",
                ParameterPrefixInName = "True",
            });
            supportedObjectsKey.AddSubKey("IVsDataTransaction");
            supportedObjectsKey.AddSubKey("IVsDataViewSupport", new
            {
                _           = "Microsoft.VisualStudio.Data.Framework.DataViewSupport",
                Assembly    = "Microsoft.VisualStudio.Data.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
                XmlResource = "EFIngresDDEXProvider.EFIngresViewSupport"
            });

            return(key);
        }