• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Services类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Any

        public Object Any(Services.Activate request)
        {
            var command = request.ConvertTo<Activate>();

            command.UserId = this.Profile.UserId;
            return _bus.Send(command).IsCommand<Command>();
        }
开发者ID:org-itbiz,项目名称:DDD.Enterprise.Example,代码行数:7,代码来源:Service.cs


示例2: OpenEditorScript

		public override string OpenEditorScript(Services.JavaScriptTextEditor editor, Control e) {
			string openScript = "";
			string closeScript = "";
			Services.IJavaScriptTextEditable editable = null;
			if (e is Services.IJavaScriptTextEditable) {
				editable = (Services.IJavaScriptTextEditable)e;
				e = editable.Content;
				openScript = editable.OnClientOpenEditor + ";";
				closeScript = editable.OnClientCloseEditor;
			}
			if (Web.UI.Scripts.jQuery.Register(e.Page) &&
#if DEBUG
				Web.UI.Scripts.Register(e.Page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/ckeditor.js") &&
				// Web.Scripts.Register(e.Page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/config.js") && 
				// Web.UI.Scripts.Register(e.Page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/adapters/jquery.js") &&
				Web.UI.Scripts.Register(e.Page, "~/Silversite/Extensions/Silversite.CKEditor/js/Silversite.CKEditor.js")) {
#else
				Web.Scripts.Register(page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/ckeditor.js") &&
				// Web.Scripts.Register(page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/config.js") && 
				// Web.Scripts.Register(page, "~/Silversite/Extensions/Silversite.CKEditor/ckeditor/adapters/jquery.js") &&
				Web.Scripts.Register(page, "~/Silversite/Extensions/Silversite.CKEditor/js/Silversite.CKEditor.js")) {
#endif
				if (string.IsNullOrEmpty(e.ClientID)) throw new ArgumentException("Content must have valid ID.");

				return openScript + "Silversite.CKEditor.Open('" + e.ClientID + "', " + CallbackCommandScript(e) + ", '" + editor.ContentType + "', '" + editor.Menu.ToString() + "', " + closeScript + "');";
			}
			return string.Empty;
		}

		Html.Converter converter = null;
开发者ID:simonegli8,项目名称:Silversite,代码行数:30,代码来源:CKEditorProvider.cs


示例3: EggGroupsController

 public EggGroupsController(Services.ServerService ServerService, Services.EggGroupService Service,
     SLLog Log)
 {
     Log_ = Log;
     Service_ = Service;
     this.ServerService_ = ServerService;
 }
开发者ID:Dezzles,项目名称:DexComplete,代码行数:7,代码来源:EggGroupsController.cs


示例4: MainViewModel

        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IDataService dataService, Services.IQaStringGeneratorService generator)
        {
            _dataService = dataService;
            _generator = generator;

            _generatedTexts = new System.Collections.ObjectModel.ObservableCollection<TextItemViewModel>();

            this.PropertyChanged += MainViewModel_PropertyChanged;

            _dataService.GetData(
                (item, error) =>
                {
                    if (error != null)
                    {
                        // Report error here
                        return;
                    }

                    _pattern = item.LastPattern;
                    _numberOfCharacters = item.LastCount;
                    _qAApproved = item.LastQa;
                    _countList = item.LastCountList;

                    _results = _generator.Generate(this.NumberOfCharacters, this.Pattern, this.QAApproved);

                    generateCountList();
                });
        }
开发者ID:patware,项目名称:GenerateText,代码行数:31,代码来源:MainViewModel.cs


示例5: BaseModule

        public BaseModule(IEventBus eventBus, Services.IGlobalSettingsService globalSettingsService, string modulePath, bool verifyConfigured) : base(modulePath)
        {
            EventBus = eventBus;
            GlobalSettingsService = globalSettingsService;

            WireSetupPipeline(verifyConfigured);
        }
开发者ID:dealproc,项目名称:Drey,代码行数:7,代码来源:BaseModule.cs


示例6: Passive

 internal Passive(Services.Dto.StaticData.PassiveDto passiveDto)
 {
     this.Description = passiveDto.description;
     this.image_full = passiveDto.image.full;
     this.Name = passiveDto.name;
     this.SanitizedDescription = passiveDto.sanitizedDescription;
 }
开发者ID:fbl07,项目名称:RiotAPI,代码行数:7,代码来源:Passive.cs


示例7: Info

 internal Info(Services.Dto.StaticData.InfoDto infoDto)
 {
     this.Attack = infoDto.attack;
     this.Defense = infoDto.defense;
     this.Difficulty = infoDto.difficulty;
     this.Magic = infoDto.magic;
 }
开发者ID:fbl07,项目名称:RiotAPI,代码行数:7,代码来源:Info.cs


示例8: Post

        public Object Post(Services.Create request)
        {
            var command = request.ConvertTo<Domain.Configuration.AccountType.Commands.Create>();
            command.DeferralMethod = DEFERRAL_METHOD.FromValue(request.DeferralMethod);

            return _bus.Send(command).IsCommand<Command>();
        }
开发者ID:org-itbiz,项目名称:DDD.Enterprise.Example,代码行数:7,代码来源:Service.cs


示例9: EmailService

 public EmailService(Services.ServerService ServerService)
 {
     EmailAddress = ServerService.GetEmailAddress();
     EmailPassword = ServerService.GetEmailPassword();
     SMTPAddress = ServerService.GetSMTPSettings();
     SMTPPort = ServerService.GetSMTPPort();
 }
开发者ID:Dezzles,项目名称:DexComplete,代码行数:7,代码来源:EmailService.cs


示例10: GameController

 public GameController(Services.ServerService ServerService,
     Services.GameService GameService, Services.PokedexService PokedexService)
 {
     this.ServerService_ = ServerService;
     this.GameService_ = GameService;
     this.PokedexService_ = PokedexService;
 }
开发者ID:Dezzles,项目名称:DexComplete,代码行数:7,代码来源:GameController.cs


示例11: CreateTestProject

 private static void CreateTestProject(bool useOAuthEndpoints)
 {
     V1Connector connector;
     if (useOAuthEndpoints)
     {
         connector = V1Connector.WithInstanceUrl(ConfigurationManager.AppSettings.Get("V1Url"))
             .WithUserAgentHeader("IntegrationTests", "1.0")
             .WithAccessToken(ConfigurationManager.AppSettings.Get("V1AccessToken"))
             .UseOAuthEndpoints()
             .Build();
     }
     else
     {
         connector = V1Connector.WithInstanceUrl(ConfigurationManager.AppSettings.Get("V1Url"))
             .WithUserAgentHeader("IntegrationTests", "1.0")
             .WithAccessToken(ConfigurationManager.AppSettings.Get("V1AccessToken"))
             .Build();
     }
     var services = new Services(connector);
     var assetType = services.Meta.GetAssetType("Scope");
     var nameAttribute = assetType.GetAttributeDefinition("Name");
     var projectId = services.GetOid("Scope:0");
     var newAsset = services.New(assetType, projectId);
     newAsset.SetAttributeValue(nameAttribute, TestProjectName);
     services.Save(newAsset);
     _testProjectId = newAsset.Oid.Momentless;
 }
开发者ID:xtremeRacer,项目名称:VersionOne.SDK.NET.APIClient,代码行数:27,代码来源:IntegrationTestsHelper.cs


示例12: EmailerService

        public EmailerService(Logging.ILogger logger
			, Services.IConnectorService connectorService
			, Services.IAccountService accountService
			, Services.CryptoService cryptoService
			, Services.IScheduledTaskService taskService
			)
        {
            this.Logger = logger;
            this.ConnectorService = connectorService;
            this.CryptoService = cryptoService;
            this.AccountService = accountService;
            this.TaskService = taskService;

            var smtpSection = System.Configuration.ConfigurationManager.GetSection("system.net/mailSettings/smtp") as System.Net.Configuration.SmtpSection;
            if (!smtpSection.From.IsNullOrTrimmedEmpty())
            {
                m_MailFrom = new MailAddress(smtpSection.From);
            }
            else
            {
                m_MailFrom = new MailAddress(ERPStoreApplication.WebSiteSettings.Contact.EmailSender,
                               ERPStoreApplication.WebSiteSettings.Contact.EmailSenderName);
            }

            var bccEmail = ERPStoreApplication.WebSiteSettings.Contact.BCCEmail ?? ERPStoreApplication.WebSiteSettings.Contact.ContactEmail;
            m_Bcc = new MailAddressCollection();
            if (bccEmail != null)
            {
                var emailList = bccEmail.Split(';');
                foreach (var email in emailList)
                {
                    m_Bcc.Add(email.Trim());
                }
            }
        }
开发者ID:hhariri,项目名称:ReSharper8Demo,代码行数:35,代码来源:EmailerService.cs


示例13: BackgroundViewModel

        public BackgroundViewModel(Services.IBackgroundServiceFactory backgroundServiceFactory)
        {
            _backgroundService = backgroundServiceFactory.MakeBackgroundServiceFromRunner<BackgroundRunners.CounterRunner>();

            _backgroundService.StartService();
            CounterState = GetRunnerCounterState();
        }
开发者ID:knezik,项目名称:gina-api-examples,代码行数:7,代码来源:BackgroundViewModel.cs


示例14: USPSProvider

 /// <summary>
 /// Creates an instance of the USPS API
 /// </summary>
 /// <param name="userID">Username</param>
 /// <param name="password">Password</param>
 public USPSProvider(string userID, string password)
 {
     this._name = "USPS";
     this._userID = userID;
     this._password = password;
     this._services = Services.Express;
 }
开发者ID:rlaneve,项目名称:dotNETShipping,代码行数:12,代码来源:USPSProvider.cs


示例15: Gold

 internal Gold(Services.Dto.StaticData.GoldDto goldDto)
 {
     this.BasePrice = [email protected];
     this.Purchasable = goldDto.purchasable;
     this.Sell = goldDto.sell;
     this.Total = goldDto.total;
 }
开发者ID:fbl07,项目名称:RiotAPI,代码行数:7,代码来源:Gold.cs


示例16: OnExecute

		protected override void OnExecute(Services.CommandContext context)
		{
			if(context.Arguments.Length < 1)
				throw new Zongsoft.Services.CommandException("Missing arguments.");

			var dictionary = this.Redis.GetDictionary(context.Arguments[0]);

			switch(context.Arguments.Length)
			{
				case 1:
					if(context.Options.Contains("all"))
					{
						context.Result = (IEnumerable<KeyValuePair<string, string>>)dictionary;
						return;
					}

					throw new Zongsoft.Services.CommandException("Missing arguments.");
				case 2:
					context.Result = dictionary[context.Arguments[1]];
					return;
			}

			var keys = new string[context.Arguments.Length - 1];
			Array.Copy(context.Arguments, 1, keys, 0, keys.Length);

			context.Result = dictionary.GetValues(keys);
		}
开发者ID:Flagwind,项目名称:Zongsoft.Externals.Redis,代码行数:27,代码来源:DictionaryGetCommand.cs


示例17: TransporterPaymentRequestController

 public TransporterPaymentRequestController(IBusinessProcessService _paramBusinessProcessService
                                            , IBusinessProcessStateService _paramBusinessProcessStateService
                                            , IApplicationSettingService _paramApplicationSettingService
                                            , ITransporterPaymentRequestService transporterPaymentRequestService
                                            , ITransportOrderService _paramTransportOrderService
                                            , IBidWinnerService bidWinnerService
                                            , IDispatchService dispatchService
                                            , IWorkflowStatusService workflowStatusService
                                            , IUserAccountService userAccountService
                                            , Services.Procurement.ITransporterService transporterService,
                                            ITransportOrderService transportOrderService,
                                            ITransportOrderDetailService transportOrderDetailService, ICommonService commodityService
                                            , IFlowTemplateService flowTemplateService)
 {
     _BusinessProcessService = _paramBusinessProcessService;
     _BusinessProcessStateService = _paramBusinessProcessStateService;
     _ApplicationSettingService = _paramApplicationSettingService;
     _transporterPaymentRequestService = transporterPaymentRequestService;
     _TransportOrderService = _paramTransportOrderService;
     _bidWinnerService = bidWinnerService;
     _dispatchService = dispatchService;
     _workflowStatusService = workflowStatusService;
     _userAccountService = userAccountService;
     _transporterService = transporterService;
     _transportOrderService = transportOrderService;
     _transportOrderDetailService = transportOrderDetailService;
     _commodityService = commodityService;
     _flowTemplateService = flowTemplateService;
 }
开发者ID:edgecomputing,项目名称:cats,代码行数:29,代码来源:TransporterPaymentRequestController.cs


示例18: ServicesManager

        public ServicesManager(
            INutConfiguration configurationManager,
            Infrastructure.ConfigurationManagement.DbConfigurationSettings.Factory dbConfigurationSettingsFactory,
            IEventBus eventBus,
            IEnumerable<IReportPeriodically> pushServices,
            IEnumerable<IRemoteInvocationService> remoteInvokedServices,
            Services.IGlobalSettingsService globalSettings,
            Func<RegisteredPackagesPollingClient> packagesPollerFactory,
            Func<PollingClientCollection> pollingCollectionFactory,
            Repositories.IPackageRepository packageRepository,
            IHoardeManager hoardeManager)
        {
            _log = LogProvider.For<ServicesManager>();

            _configurationManager = configurationManager;
            _dbConfigurationSettingsFactory = dbConfigurationSettingsFactory;
            _eventBus = eventBus;
            _pushServices = pushServices;
            _remoteInvokedServices = remoteInvokedServices;
            _globalSettings = globalSettings;

            _packagesPollerFactory = packagesPollerFactory;
            _pollingCollectionFactory = pollingCollectionFactory;

            _packageRepository = packageRepository;

            _hoardeManager = hoardeManager;
        }
开发者ID:dealproc,项目名称:Drey,代码行数:28,代码来源:ServicesManager.cs


示例19: Passive

 internal Passive(Services.Dto.StaticData.PassiveDto passiveDto)
 {
     this.Description = passiveDto.description;
     this.Image = new Image(passiveDto.image);
     this.Name = passiveDto.name;
     this.SanitizedDescription = passiveDto.sanitizedDescription;
 }
开发者ID:fbl07,项目名称:RiotAPI,代码行数:7,代码来源:Passive.cs


示例20: OnExecute

		protected override void OnExecute(Services.CommandContext context)
		{
			if(context.Arguments.Length < 1)
				throw new Services.CommandException("Missing arguments.");

			var length = (int)context.Options["length"];

			if(context.Arguments.Length == 1)
			{
				context.Result = this.Redis.GetQueue(context.Arguments[0]).Dequeue(length);
				return;
			}

			var result = new string[context.Arguments.Length * length];

			for(int i = 0; i < context.Arguments.Length; i++)
			{
				var queue = this.Redis.GetQueue(context.Arguments[i]);
				var items = queue.Dequeue(length);

				int j = 0;

				foreach(var item in items)
				{
					result[i * context.Arguments.Length + j++] = (string)item;
				}
			}

			context.Result = result;
		}
开发者ID:Flagwind,项目名称:Zongsoft.Externals.Redis,代码行数:30,代码来源:QueueDequeueCommand.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Session类代码示例发布时间:2022-05-24
下一篇:
C# ServiceType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap