本文整理汇总了C#中OutputType类的典型用法代码示例。如果您正苦于以下问题:C# OutputType类的具体用法?C# OutputType怎么用?C# OutputType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OutputType类属于命名空间,在下文中一共展示了OutputType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Get
public static IOutputRepository Get(OutputType type)
{
switch (type)
{
case OutputType.Csv:
return CsvOutputRepository.Instance;
case OutputType.Json:
return JsonOutputRepository.Instance;
case OutputType.Txt:
return TxtOutputRepository.Instance;
case OutputType.Xml:
return XmlOutputRepository.Instance;
case OutputType.Dot:
return DotOutputRepository.Instance;
case OutputType.None:
return NoneOutputRepository.Instance;
case OutputType.Markdown:
return MarkdownOutputRepository.Instance;
case OutputType.Html:
return HtmlOutputRepository.Instance;
}
return JsonOutputRepository.Instance;
}
开发者ID:Badgerati,项目名称:Edison,代码行数:31,代码来源:OutputRepositoryFactory.cs
示例2: GetOuputExtension
public static string GetOuputExtension(OutputType outputType)
{
if (outputType == OutputType.Library)
return ".dll";
else
return ".exe";
}
开发者ID:chunlea,项目名称:rubydotnetcompiler,代码行数:7,代码来源:RubyProjectNode.cs
示例3: ActivateMonitors_ActivateById
public void ActivateMonitors_ActivateById(OutputType output)
{
int idMonitorToDelete = AddMonitor(externalMonitor, output);
monitorsToDelete.Add(idMonitorToDelete);
externalMonitor.ActivateMonitors(idMonitorToDelete,output);
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:7,代码来源:ExternalMonitorTests.cs
示例4: ActivateMonitors_ActivateByTag
public void ActivateMonitors_ActivateByTag(OutputType output)
{
int idMonitorToDelete = AddMonitor(externalMonitor, output);
monitorsToDelete.Add(idMonitorToDelete);
externalMonitor.ActivateMonitors(tag:tagNew,output:output);
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:7,代码来源:ExternalMonitorTests.cs
示例5: Authentication
/// <summary>
/// Authentication by apiKey, secretKey (optional) and authToken (optional)
/// </summary>
/// <param name="apiKey">ApiKey of user</param>
/// <param name="secretKey">SecretKey. If null, it will be get by ApiKey</param>
/// <param name="authToken">AuthToken. If null, it will be get by ApiKey and SecretKey</param>
public Authentication(string apiKey, string secretKey = null, string authToken = null, OutputType? output=null)
{
OutputGlobal = GetOutput(output);
this.apiKey = apiKey;
this.secretKey = string.IsNullOrEmpty(secretKey) ? GetSecretKey() : secretKey;
this.authToken = string.IsNullOrEmpty(authToken) ? GetAuthToken() : authToken;
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:13,代码来源:Authentication.cs
示例6: AddMonitor
public static int AddMonitor(ExternalMonitor externalMonitor, OutputType output,bool dnsWithParams=false)
{
string testName = "test ping ololo: ololo;" + Common.GenerateRandomString(5);
string tag = tagNew;
int[] locationsIds = new int[] { 4, 11 };
ExternalMonitor.TestType testType = ExternalMonitor.TestType.ping;
if (dnsWithParams)
testType = ExternalMonitor.TestType.dns;
var testparams = new Dictionary<string, string>();
if (dnsWithParams)
{
//testparams.Add("test1", "fffgfygfhgf");
//testparams.Add("test2", "bbb");
//testparams.Add("test3", "dddd");
//testparams.Add("test4", "ffff");
//testparams.Add("test5", "ffff");
testparams.Add("server", "google.com");
testparams.Add("expip", "209.85.148.113");
testparams.Add("expauth", "A");
}
var result = externalMonitor.AddMonitor(
testType,
testName,
url,
ExternalMonitor.CheckInterval.five,
tag,
output: output,
locationIds: locationsIds,
testParams: testparams);
return result.testId;
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:34,代码来源:ExternalMonitorTests.cs
示例7: OutputWatcher
public OutputWatcher(OutputType type)
{
timer = new Timer();
this._OutputType=type;
timer.Enabled = true;
timer.Interval = 100;
if (_OutputType == OutputType.Console)
{
System.Console.SetOut(writer);
System.Console.SetError(writer);
} else if (_OutputType == OutputType.Debug) {
//TODO
} else {
throw new ArgumentException("Cannot Find " + _OutputType.ToString() + "!");
}
timer.Tick += delegate(object sender, EventArgs e) {
if (Document.Text != writer.ToString())
{
Document.Text = writer.ToString();
changed = true;
}
};
Document = new Alsing.SourceCode.SyntaxDocument();
changed = true;
}
开发者ID:westybsa,项目名称:MP.LSharp,代码行数:26,代码来源:OutputWatcher.cs
示例8: Authenticate
/// <summary>
/// Gets apiKey, secretKey and authToken
/// </summary>
/// <param name="userName">Name of user</param>
/// <param name="password">Password of user</param>
/// <param name="output">Set global output (or use exists - JSON by default)</param>
public void Authenticate(string userName, string password,OutputType? output=null)
{
OutputGlobal = GetOutput(output);
apiKey = GetApiKey(userName, password, OutputGlobal);
secretKey = GetSecretKey();
authToken = GetAuthToken();
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:13,代码来源:Authentication.cs
示例9: OutputWindow
public OutputWindow(Note note, OutputType outputType)
{
Note = note;
OutputType = outputType;
InitializeComponent();
}
开发者ID:beaugunderson,项目名称:notational-ferocity,代码行数:7,代码来源:OutputWindow.xaml.cs
示例10: Arguments
public Arguments()
{
Authentication = new Authentication();
OverrideConfig = new Config();
Output = OutputType.Json;
UpdateAssemblyInfoFileName = new HashSet<string>();
}
开发者ID:pascalberger,项目名称:GitVersion,代码行数:7,代码来源:Arguments.cs
示例11: GetMonitorInfo
public virtual RestResponse GetMonitorInfo(int monitorId, OutputType? output = null)
{
var parameters = new Dictionary<string, object>();
parameters.Add(Params.monitorId, monitorId);
RestResponse resp = MakeGetRequest(GetAction(MonitorAction.getMonitorInfo), parameters, output: output);
return resp;
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:7,代码来源:BaseMonitor.cs
示例12: Player
public Player(List<Player> players, OutputType outputType)
{
writer = new Output(outputType);
writer.Write("Enter the name of the player: ");
this.name = Console.ReadLine().Trim();
writer.Write("Enter the piece you want to use: ");
this.piece = new Piece(Console.ReadLine().Trim());
while (players.Select(p => p).Where(x => string.Compare(x.Piece.Symbol, this.piece.Symbol) == 0).Count() >= 1)
{
writer.Write("That piece has already been taken.\nChoose a different piece: ");
this.piece = new Piece(Console.ReadLine().Trim());
}
writer.Write("Is this player HUMAN or AI: ");
do
{
var playerType = Console.ReadLine().Trim();
PlayerType humanOrNot;
if (Enum.TryParse<PlayerType>(playerType.ToUpper(), out humanOrNot))
{
this.playerType = humanOrNot;
break;
}
writer.Write("Enter a valid Player Type: [human] or [AI]: ");
continue;
} while (true);
this.order = -1;
}
开发者ID:sauravMSFT,项目名称:TicTacToe-OOP,代码行数:30,代码来源:Player.cs
示例13: GetAgentInfo
public RestResponse GetAgentInfo(int agentId, OutputType output)
{
var parameters = new Dictionary<String, Object>();
parameters.Add("agentId", agentId);
parameters.Add("output", output);
return MakeGetRequest(CustomUserAgentAction.agentInfo, parameters);
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:7,代码来源:CustomUserAgent.cs
示例14: GetSetting
private bool GetSetting(OutputType outputType, OutputLevel outputLevel, bool defaultValue)
{
var settingName = string.Format("{0}{1}", outputType, outputLevel);
var data = System.Configuration.ConfigurationManager.AppSettings[settingName];
bool result;
return bool.TryParse(data, out result) ? result : defaultValue;
}
开发者ID:DaemonOverlord,项目名称:tharga-console,代码行数:7,代码来源:ServerConsole.cs
示例15: ToConsole
/// <summary>
/// Send benchmark output to the console..
/// </summary>
/// <param name="messageFormat">The message format.</param>
/// <returns><see cref="Benchmark"/> instance for chaining.</returns>
public Benchmark ToConsole(string messageFormat)
{
this.currentMessageFormat = messageFormat;
this.currentOutputType = OutputType.Console;
this.timer.Reset();
this.timer.Start();
return this;
}
开发者ID:rodpl,项目名称:Four2n.Commons,代码行数:13,代码来源:Benchmark.cs
示例16: ActivateMonitors
public virtual RestResponse ActivateMonitors(int[] monitorIds, string tag, OutputType? output = null, Validation? validation = null)
{
var parameters = new Dictionary<string, object>();
AddIfNotNull(parameters, Params.monitorIds, string.Join(",", monitorIds));
AddIfNotNull(parameters, Params.tag, tag);
RestResponse resp = MakePostRequest(GetAction(MonitorAction.activateMonitors), parameters, output: output, validation: validation);
return resp;
}
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:8,代码来源:BaseMonitor.cs
示例17: ProgramOptions
// Default options
public ProgramOptions()
{
outputName = null;
outtype = OutputType.Text;
useGPbased = true;
enableListing = false;
useAT = true;
}
开发者ID:walter-artica,项目名称:r5asm,代码行数:9,代码来源:ProgramOptions.cs
示例18: RenderMessage
internal void RenderMessage(string msg, OutputType typ)
{
var output = Output.OutputManager.GenerateMessage(msg);
SetOutput(output);
Style = GetStyle(typ);
if ((output as Control) != null)
(output as Control).Foreground = Foreground;
}
开发者ID:AkshayVats,项目名称:SuperShell,代码行数:8,代码来源:OutputCard.xaml.cs
示例19: Write
public async void Write(string text, OutputType type)
{
await RichTextBlock.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
Paragraph.Inlines.Add(new Run { Text = text, Foreground = new SolidColorBrush(GetColor(type)) });
ScrollToEnd();
});
}
开发者ID:CupWorks,项目名称:GGJ2016,代码行数:8,代码来源:DefaultOutput.cs
示例20: Logger
private Logger(string name, Level level, OutputType outType, ProgressOutputType progressOutType, Node node)
{
mName = name;
mInheritedLevel = level;
mInheritedOutputType = outType;
mInheritedProgressOutputType = progressOutType;
mNode = node;
}
开发者ID:project-first,项目名称:messaging,代码行数:8,代码来源:Logger.cs
注:本文中的OutputType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论