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


C# IService类代码示例

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


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

示例1: SearchController

 public SearchController(IService<SearchRequest, SearchModel> service, IStudentSchoolAreaLinks studentSchoolLinks, ICurrentUserClaimInterrogator currentUserClaimInterrogator, IGradeLevelUtilitiesProvider gradeLevelUtilitiesProvider)
 {
     this.service = service;
     this.studentSchoolLinks = studentSchoolLinks;
     this.currentUserClaimInterrogator = currentUserClaimInterrogator;
     this.gradeLevelUtilitiesProvider = gradeLevelUtilitiesProvider;
 }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:7,代码来源:SearchController.cs

示例2: JsonRpcDispatcher

        public JsonRpcDispatcher(IService service, IServiceProvider serviceProvider)
        {
            if (service == null)
                throw new ArgumentNullException("service");

            _service = service;

            if (serviceProvider == null)
            {
                //
                // No service provider supplied so check if the RPC service
                // itself is our service provider.
                //

                serviceProvider = service as IServiceProvider;

                //
                // If no service provider found so far, then create a default
                // one.
                //

                if (serviceProvider == null)
                    serviceProvider = new ServiceContainer();
            }

            _serviceProvider = serviceProvider;
        }
开发者ID:BackupTheBerlios,项目名称:tamjb,代码行数:27,代码来源:JsonRpcDispatcher.cs

示例3: GenerateSchemaClasses

        /// <summary>
        /// Generates all schema classes for the specified service
        /// </summary>
        /// <param name="service"></param>
        /// <returns></returns>
        public CodeNamespace GenerateSchemaClasses(IService service)
        {
            service.ThrowIfNull("service");

            logger.Debug("Starting to generate schemas for {1} in namespace {0}", schemaNamespace, service.Name);
            LogDecorators();
            var codeNamespace = new CodeNamespace(schemaNamespace);
            codeNamespace.Imports.Add(new CodeNamespaceImport("System"));
            codeNamespace.Imports.Add(new CodeNamespaceImport("System.Collections"));
            codeNamespace.Imports.Add(new CodeNamespaceImport("System.Collections.Generic"));
            SchemaGenerator generator = new SchemaGenerator(decorators);

            // Generate implementation details
            IDictionary<JsonSchema, SchemaImplementationDetails> implementationDetails =
                implementationDetailsGenerator.GenerateDetails(service);

            // Generate schemas
            foreach (var schemaPair in service.Schemas)
            {
                logger.Debug("Generating Schema {0}", schemaPair.Key);

                // Create schema
                codeNamespace.Types.Add(
                    generator.CreateClass(schemaPair.Value, implementationDetails, service.Schemas.Keys));
            }
            return codeNamespace;
        }
开发者ID:JANCARLO123,项目名称:google-apis,代码行数:32,代码来源:GoogleSchemaGenerator.cs

示例4: Init

        public void Init()
        {
            container = new UnityContainer();
            ContainerBootstrap.RegisterTypes(container);

            service = container.Resolve<IService>();
        }
开发者ID:raphonks,项目名称:Test,代码行数:7,代码来源:HomeControllerTest.cs

示例5: JsonRpcDispatcher

        public JsonRpcDispatcher(IService service)
        {
            if (service == null)
                throw new ArgumentNullException("service");

            _service = service;
        }
开发者ID:madalingavanarescu,项目名称:jayrock,代码行数:7,代码来源:JsonRpcDispatcher.cs

示例6: ServiceRunner

 public ServiceRunner(IService service, string serviceName)
 {
     if (service == null) throw new ArgumentNullException("service");
     if (serviceName == null) throw new ArgumentNullException("serviceName");
     _service = service;
     ServiceName = serviceName;
 }
开发者ID:vjohnson01,项目名称:Tools,代码行数:7,代码来源:ServiceRunner.cs

示例7: SetUp

        public void SetUp()
        {
            _lastService = null;
            _manager = null;

            _defaultRegistry = (registry =>
            {
                //registry.ForRequestedType<IService>()
                //    .AddInstances(
                //    Instance<ColorService>().WithName("Red").WithProperty("color").
                //        EqualTo(
                //        "Red"),
                //    Object<IService>(new ColorService("Yellow")).WithName("Yellow"),
                //    ConstructedBy<IService>(
                //        delegate { return new ColorService("Purple"); })
                //        .WithName("Purple"),
                //    Instance<ColorService>().WithName("Decorated").WithProperty("color")
                //        .
                //        EqualTo("Orange")
                //    );

                registry.ForRequestedType<IService>().AddInstances(x =>
                {
                    x.OfConcreteType<ColorService>().WithName("Red").WithProperty("color").EqualTo("Red");

                    x.Object(new ColorService("Yellow")).WithName("Yellow");

                    x.ConstructedBy(() => new ColorService("Purple")).WithName("Purple");

                    x.OfConcreteType<ColorService>().WithName("Decorated").WithProperty("color").EqualTo("Orange");
                });
            });
        }
开发者ID:joshuaflanagan,项目名称:structuremap,代码行数:33,代码来源:InterceptAllInstancesOfPluginTypeTester.cs

示例8: CharacteristicDetail_TISensor

		public CharacteristicDetail_TISensor (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
		{
			InitializeComponent ();
			this.characteristic = characteristic;

			Title = characteristic.Name;
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:7,代码来源:CharacteristicDetail_TISensor.xaml.cs

示例9: DecorateClass

 public void DecorateClass(IService service, CodeTypeDeclaration serviceClass)
 {
     serviceClass.Members.Add(CreateVersionField(service));
     serviceClass.Members.Add(CreateNameField(service));
     serviceClass.Members.Add(CreateUriField(service));
     serviceClass.Members.Add(CreateDiscoveryVersionField(service));
 }
开发者ID:nick0816,项目名称:LoggenCSG,代码行数:7,代码来源:VersionInformationServiceDecorator.cs

示例10: LogInAsController

        public LogInAsController(IService<CanLogInAsUserRequest, CanLogInAsUserModel> service, ILocalEducationAgencyAreaLinks localEducationAgencyAreaLinks,
			ISignInRequestMessageProvider signInRequestMessageProvider)
        {
            this.service = service;
            this.localEducationAgencyAreaLinks = localEducationAgencyAreaLinks;
            this.signInRequestMessageProvider = signInRequestMessageProvider;
        }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:7,代码来源:LogInAsController.cs

示例11: MultipleServiceManager

 public MultipleServiceManager(ILog log, IService[] services)
 {
     this.log = log;
     this.services = services.OrderBy(s => s.StartIndex).ToArray();
     ServiceName = "IronFoundryDEA"; // NB: must match installer Product.wxs
     AutoLog = true;
 }
开发者ID:BrianMMcClain,项目名称:ironfoundry,代码行数:7,代码来源:MultipleServiceManager.cs

示例12: CommandServicePresenter

   public CommandServicePresenter(IView view, IService service,
 ICommandExecutor executor)
   {
       _view = view;
         _service = service;
         _executor = executor;
   }
开发者ID:butaji,项目名称:Sapphire,代码行数:7,代码来源:CommandServicePresenter.cs

示例13: ServiceRunner

 public ServiceRunner(IService service, string server, IDefaultBindingFactory defaultBindingFactory, IServerUriFactory serverUriFactory)
 {
     _service = service;
     _server = server;
     _defaultBindingFactory = defaultBindingFactory;
     _serverUriFactory = serverUriFactory;
 }
开发者ID:guozanhua,项目名称:phmi,代码行数:7,代码来源:ServiceRunner.cs

示例14: CategoryController

 public CategoryController(
     IService<Category> categoriesService,
     ICategoriesService categories)
 {
     this.categoriesService = categoriesService;
     this.categories = categories;
 }
开发者ID:tddold,项目名称:MVC-Project,代码行数:7,代码来源:CategoryController.cs

示例15: CreateNameField

 internal CodeMemberField CreateNameField(IService service)
 {
     var name = new CodeMemberField(typeof(string), NameName);
     name.Attributes = MemberAttributes.Const | MemberAttributes.Private;
     name.InitExpression = new CodePrimitiveExpression(service.Name);
     return name;
 }
开发者ID:nick0816,项目名称:LoggenCSG,代码行数:7,代码来源:VersionInformationServiceDecorator.cs


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