本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: Init
public void Init()
{
container = new UnityContainer();
ContainerBootstrap.RegisterTypes(container);
service = container.Resolve<IService>();
}
示例5: JsonRpcDispatcher
public JsonRpcDispatcher(IService service)
{
if (service == null)
throw new ArgumentNullException("service");
_service = service;
}
示例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;
}
示例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");
});
});
}
示例8: CharacteristicDetail_TISensor
public CharacteristicDetail_TISensor (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
{
InitializeComponent ();
this.characteristic = characteristic;
Title = characteristic.Name;
}
示例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));
}
示例10: LogInAsController
public LogInAsController(IService<CanLogInAsUserRequest, CanLogInAsUserModel> service, ILocalEducationAgencyAreaLinks localEducationAgencyAreaLinks,
ISignInRequestMessageProvider signInRequestMessageProvider)
{
this.service = service;
this.localEducationAgencyAreaLinks = localEducationAgencyAreaLinks;
this.signInRequestMessageProvider = signInRequestMessageProvider;
}
示例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;
}
示例12: CommandServicePresenter
public CommandServicePresenter(IView view, IService service,
ICommandExecutor executor)
{
_view = view;
_service = service;
_executor = executor;
}
示例13: ServiceRunner
public ServiceRunner(IService service, string server, IDefaultBindingFactory defaultBindingFactory, IServerUriFactory serverUriFactory)
{
_service = service;
_server = server;
_defaultBindingFactory = defaultBindingFactory;
_serverUriFactory = serverUriFactory;
}
示例14: CategoryController
public CategoryController(
IService<Category> categoriesService,
ICategoriesService categories)
{
this.categoriesService = categoriesService;
this.categories = categories;
}
示例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;
}