本文整理汇总了C#中Services.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Services.ToString方法的具体用法?C# Services.ToString怎么用?C# Services.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Services
的用法示例。
在下文中一共展示了Services.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEntityService
public override IService GetEntityService(Services serviceName)
{
var obj = new object();
var type = Type.GetType(GetImplName(serviceName.ToString()));
if (type != null) obj = Activator.CreateInstance(type);
return (IService) obj;
}
示例2: GetService
public override IService GetService(Services serviceName)
{
Type type;
var obj = new object();
try
{
type = Type.GetType(GetImplName(serviceName.ToString()));
obj = Activator.CreateInstance(type);
}
catch (Exception e)
{
Console.WriteLine("Exception occured: {0}", e);
throw e;
}
return (IService)obj;
}
示例3: GetSoapService
/// <summary>
/// Abstract implementation method, returns the requested service
/// </summary>
/// <param name="serviceName">Enum - defines the specific service to be retrived</param>
/// <param name="path">The directory path to where the app can find the PassOne data files</param>
/// <param name="passOneUser">Optional parameter - required for credentials services</param>
/// <returns></returns>
public override IService GetSoapService(Services serviceName, string path, PassOneUser passOneUser = null)
{
Type type;
var obj = new object();
try
{
type = Type.GetType(GetImplName(serviceName.ToString()));
obj = Activator.CreateInstance(type);
}
catch (MissingMethodException)
{
obj = new CredentialsSoapSerializer(passOneUser);
}
catch (Exception e)
{
Console.WriteLine("Exception occured: {0}", e);
throw e;
}
((ISerializeSvc)obj).SetPath(path);
return (IService) obj;
}
示例4: UpdateStateOfMatchChoice
private long? UpdateStateOfMatchChoice(Services.Contracts.Common.ChoiceTypeEnum choiceType,
Choice choice,
long userID)
{
long? result = null;
if (choice.ProfileChoice.ChoiceType == Services.Contracts.Common.ChoiceTypeEnum.Like)
{
if (choice.ProfileChoice.MatchChoice != null)
{
if (choice.ProfileChoice.MatchChoice.MatchChoiceType == Services.Contracts.Common.ChoiceTypeEnum.Like)
{
// Transition the state to consent.
result = ChoiceTypeID(choiceType.ToString());
// set the match user state to consent as well.
var matchChoice = choice.CreateProfileChoiceModelInstance(choice.ProfileChoice.MatchUser.UserID.Value,
userID,
choice.ProfileChoice.MatchChoice.ID.Value);
base.ProfileChocies.Attach(matchChoice);
matchChoice = choice.SetProfileChoiceModelInstance(matchChoice,
result.Value);
}
}
}
return result;
}
示例5: TextInput
public static void TextInput(Services title, string message)
{
var dialog = new MessageDialog(message, title.ToString()).ShowAsync();
}
示例6: AddLog
public void AddLog(PortalSettings _PortalSettings, int UserID, Services.Log.EventLog.EventLogController.EventLogType objLogType)
{
LogProperties objProperties = new LogProperties();
AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
}
示例7: Run
public static void Run(Services service, DirectoryInfo directory, ExecMode mode = ExecMode.Run, bool noNewWindows=true)
{
Shell.SilentMode = noNewWindows;
Main(new string[] { service.ToString(), directory.FullName, mode.ToString() });
}