当前位置: 首页>>代码示例>>C#>>正文


C# IRegistry类代码示例

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


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

示例1: GetMicrosoftRClientInfo

        public static IRInterpreterInfo GetMicrosoftRClientInfo(IRegistry registry = null, IFileSystem fileSystem = null) {
            registry = registry ?? new RegistryImpl();
            fileSystem = fileSystem ?? new FileSystem();

            // If yes, check 32-bit registry for R engine installed by the R Server.
            // TODO: remove this when MRS starts writing 64-bit keys.
            if (IsMRCInstalledInSql(registry)) {
                using (IRegistryKey hklm = registry.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) {
                    try {
                        using (var key = hklm.OpenSubKey(@"SOFTWARE\R-core\R64")) {
                            foreach (var keyName in key.GetSubKeyNames()) {
                                using (var rsKey = key.OpenSubKey(keyName)) {
                                    try {
                                        var path = (string)rsKey?.GetValue("InstallPath");
                                        if (!string.IsNullOrEmpty(path) && path.Contains(_rServer)) {
                                            var info = new RInterpreterInfo(string.Empty, path);
                                            if (info.VerifyInstallation(new SupportedRVersionRange(), fileSystem)) {
                                                return new RInterpreterInfo(Invariant($"Microsoft R Client (SQL) {info.Version.Major}.{info.Version.Minor}.{info.Version.Build}"), info.InstallPath);
                                            }
                                        }
                                    } catch (Exception) { }
                                }
                            }
                        }
                    } catch (Exception) { }
                }
            }

            return null;
        }
开发者ID:Microsoft,项目名称:RTVS,代码行数:30,代码来源:SqlRClientInstallation.cs

示例2: UpdatePluginList

        public void UpdatePluginList(IRegistry registry)
        {
            PluginDescriptors = new List<IPluginDescriptor>(registry.Plugins);
            PluginDescriptors.Sort((l, r) => l.PluginId.CompareTo(r.PluginId));

            OnStructureChanged(new TreePathEventArgs(new TreePath(root)));
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:PluginTreeModel.cs

示例3: SetupExtensibility

        private static void SetupExtensibility(IRegistry registry)
        {
            var dynamicProxy = new CastleDynamicProxyProvider();
            var aopRepository = new AspectRepository(dynamicProxy);

            var dllPlugins =
                (from key in ConfigurationManager.AppSettings.AllKeys
                 where key.StartsWith("PluginsPath", StringComparison.OrdinalIgnoreCase)
                 let path = ConfigurationManager.AppSettings[key]
                 let pathRelative = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path)
                 let chosenPath = Directory.Exists(pathRelative) ? pathRelative : path
                 select chosenPath)
                .ToList();
            registry.RegisterInstance(new PluginsConfiguration { Directories = dllPlugins });

            registry.Register<SystemInitialization>();
            registry.Register<IObjectFactory, DryIocObjectFactory>(Reuse.Singleton);
            registry.Register<IExtensibilityProvider, DryIocMefProvider>(Reuse.Singleton);
            registry.Register(typeof(IPluginRepository<>), typeof(PluginRepository<>), Reuse.Singleton);

            registry.RegisterInstance<IAspectRegistrator>(aopRepository);
            registry.RegisterInstance<IAspectComposer>(aopRepository);
            //registry.RegisterInstance<IInterceptorRegistrator>(aopRepository);
            registry.RegisterInstance<IMixinProvider>(dynamicProxy);
            registry.RegisterInstance<IDynamicProxyProvider>(dynamicProxy);
        }
开发者ID:nutrija,项目名称:revenj,代码行数:26,代码来源:DryIocConfiguration.cs

示例4: Register

        public static void Register(IRegistry registry)
        {
            if(registry == null)
                throw new ArgumentNullException("registry");

            registry.For<IConfigurationManager>().Singleton().Use<ConfigurationManagerWrapper>();
        }
开发者ID:HansKindberg-Net,项目名称:HansKindberg,代码行数:7,代码来源:Registry.cs

示例5: RegistryResourceLocator

        /// <summary>
        /// Creates a resource locator based on a registry.
        /// </summary>
        /// <param name="registry">The registry.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="registry"/> is null.</exception>
        public RegistryResourceLocator(IRegistry registry)
        {
            if (registry == null)
                throw new ArgumentNullException("registry");

            this.registry = registry;
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:12,代码来源:RegistryResourceLocator.cs

示例6: Process

 private void Process(Type type, IRegistry registry)
 {
     if (!type.IsAbstract && typeof (IController).IsAssignableFrom(type))
     {
         registry.AddType(type, type);
     }
 }
开发者ID:DerAlbertCom,项目名称:ApereaFramework,代码行数:7,代码来源:ControllerRegistryConvention.cs

示例7: NKCellRecord

        // protected internal constructors...
        /// <summary>
        ///     Initializes a new instance of the <see cref="NKCellRecord" /> class.
        ///     <remarks>Represents a Key Node Record</remarks>
        /// </summary>
        protected internal NKCellRecord(int recordSize, long relativeOffset, IRegistry registryHive)
        {
            RelativeOffset = relativeOffset;
            _registryHive = registryHive;
            _rawBytesLength = recordSize;

                        ValueOffsets = new List<ulong>();
        }
开发者ID:seandiviney,项目名称:Registry,代码行数:13,代码来源:NKCellRecord.cs

示例8: LoggingPermissions

        public LoggingPermissions(IApplicationConstants appConstants, ITelemetryService telemetryService, IRegistry registry) {
            _appConstants = appConstants;
            _telemetryService = telemetryService;
            _registry = registry;

            _registryVerbosity = GetLogLevelFromRegistry();
            _registryFeedbackSetting = GetFeedbackFromRegistry();
        }
开发者ID:Microsoft,项目名称:RTVS,代码行数:8,代码来源:LoggingPermissions.cs

示例9: AddRegistryInfo

 private static void AddRegistryInfo(IRegistry registry)
 {
     registry.Scan(scanner =>
     {
         scanner.AssemblyContainingType<Bootstrapper>();
         scanner.LookForRegistries();
     });
 }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:8,代码来源:Bootstrapper.cs

示例10: ObjectCreator

        internal ObjectCreator(IRegistry registry)
        {
            ReturnType = null;
            IsSingleton = false;

            _onCreation = null;
            _registry = registry;
        }
开发者ID:Pondidum,项目名称:Seivad,代码行数:8,代码来源:ObjectCreator.cs

示例11: TDNetRunnerInstaller

 public TDNetRunnerInstaller(ITestFrameworkManager testFrameworkManager, IRegistry registry, ILogger logger,
     TDNetPreferenceManager preferenceManager)
 {
     this.testFrameworkManager = testFrameworkManager;
     this.registry = registry;
     this.logger = logger;
     this.preferenceManager = preferenceManager;
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:8,代码来源:TDNetRunnerInstaller.cs

示例12: IsValid

        public bool IsValid(ref IRegistry registry, List<OperandeVariable> variables)
        {
            if (_expression == null)
              {
            return false;
              }

              return _expression.Accept(new ValidatorVisitor(ref registry, variables));
        }
开发者ID:AdrienEtienne,项目名称:script-builder,代码行数:9,代码来源:ExpressionInstruction.cs

示例13: ApplyCatalogToRegistry

 private static void ApplyCatalogToRegistry(IProgressMonitor progressMonitor, 
     IPluginCatalog pluginCatalog, IRegistry registry)
 {
     using (var subProgressMonitor = progressMonitor.CreateSubProgressMonitor(45))
     {
         subProgressMonitor.BeginTask(Resources.UpdatePluginFolderCommand_Applying_catalog_to_registry, 100);
         pluginCatalog.ApplyTo(registry);
     }
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:9,代码来源:UpdatePluginFolderCommand.cs

示例14: AddRegistry

        /// <summary>
        /// Adds the registry to the builder.
        /// </summary>
        /// <param name="registry">The registry to be added to the builder.</param>
        /// <remarks>
        /// Registry instances must be applied to a new container in the order that they are added for deterministic behavior.
        /// </remarks>
        public void AddRegistry(IRegistry registry)
        {
            if (null == registry)
            {
                throw new ArgumentNullException("registry");
            }

            _registries.Add(registry);
        }
开发者ID:wade,项目名称:Speedioc,代码行数:16,代码来源:GeneratedContainerBulider.cs

示例15: RegisterIoC

 internal static void RegisterIoC(IRegistry registry)
 {
     registry.Register<ICodeLocationRepository>(new CodeLocationRepository());
     registry.Register<IApiDataRepository>(new ApiDataRepository());
     registry.Register<IJobRepository>(new JobRepository());
     registry.Register<IWorkerRepository>(new WorkerRepository());
     registry.Register<IFileRepository>(new FileRepository());
     registry.Register<IRepositoryController>(new RepositoryController());
 }
开发者ID:codeimpossible,项目名称:proggr,代码行数:9,代码来源:Startup.IoC.cs


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