本文整理汇总了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>();
}
示例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;
示例3: EggGroupsController
public EggGroupsController(Services.ServerService ServerService, Services.EggGroupService Service,
SLLog Log)
{
Log_ = Log;
Service_ = Service;
this.ServerService_ = ServerService;
}
示例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();
});
}
示例5: BaseModule
public BaseModule(IEventBus eventBus, Services.IGlobalSettingsService globalSettingsService, string modulePath, bool verifyConfigured) : base(modulePath)
{
EventBus = eventBus;
GlobalSettingsService = globalSettingsService;
WireSetupPipeline(verifyConfigured);
}
示例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;
}
示例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;
}
示例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>();
}
示例9: EmailService
public EmailService(Services.ServerService ServerService)
{
EmailAddress = ServerService.GetEmailAddress();
EmailPassword = ServerService.GetEmailPassword();
SMTPAddress = ServerService.GetSMTPSettings();
SMTPPort = ServerService.GetSMTPPort();
}
示例10: GameController
public GameController(Services.ServerService ServerService,
Services.GameService GameService, Services.PokedexService PokedexService)
{
this.ServerService_ = ServerService;
this.GameService_ = GameService;
this.PokedexService_ = PokedexService;
}
示例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;
}
示例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());
}
}
}
示例13: BackgroundViewModel
public BackgroundViewModel(Services.IBackgroundServiceFactory backgroundServiceFactory)
{
_backgroundService = backgroundServiceFactory.MakeBackgroundServiceFromRunner<BackgroundRunners.CounterRunner>();
_backgroundService.StartService();
CounterState = GetRunnerCounterState();
}
示例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;
}
示例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;
}