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


C# Services类代码示例

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


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


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