本文整理汇总了C#中IOutput类的典型用法代码示例。如果您正苦于以下问题:C# IOutput类的具体用法?C# IOutput怎么用?C# IOutput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IOutput类属于命名空间,在下文中一共展示了IOutput类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Report
public void Report(IOutput output)
{
JavaScriptSerializer s = new JavaScriptSerializer();
string serialize = s.Serialize(_qs);
output.Out(serialize);
}
开发者ID:asiConduit,项目名称:qtools,代码行数:7,代码来源:JsonReporter.cs
示例2: Report
public void Report(IOutput output)
{
foreach (var q in _qs)
{
output.Out(q.ToString());
}
}
开发者ID:asiConduit,项目名称:qtools,代码行数:7,代码来源:LineReporter.cs
示例3: ScoreControl
public ScoreControl(IUnityContainer container, IOutput output, IMidiInput midiInput, IInputEvents inputEvents, IMediaServiceHost mediaServiceHost,
IVirtualKeyBoard virtualKeyboard, ILogger logger, XScore musicScore)
: this()
{
_container = container;
_output = output;
_intputEvents = inputEvents;
_midiInput = midiInput;
_virtualKeyboard = virtualKeyboard;
_musicScore = musicScore;
_mediaServiceHost = mediaServiceHost;
_logger = logger;
_updateScrollTimer = new Timer(ScrollTimerHandler, null, Timeout.Infinite, _scrollTimingPerdiod);
_scoreParser = new ScoreParser(_musicScore, ScoreGrid);
_scoreParser.Render();
ScoreGrid.Width = _scoreParser.GetMaxHorizontalPosition();
nextBarDetails = new BarDetails();
nextBarDetails.NoteTime = 0;
nextBarDetails.XCoord = 0;
_intputEvents.MessageReceived += HandleInputEvent;
_midiInput.StartRecording();
ConfigureSongEventController();
}
开发者ID:hortonal,项目名称:MrKeys,代码行数:29,代码来源:ScoreControl.xaml.cs
示例4: ChangelogBuilder
public ChangelogBuilder([NotNull] ReleaseDirInfo[] releaseDirs, [NotNull] IOutput output)
{
if (releaseDirs == null) throw new ArgumentNullException("releaseDirs");
if (output == null) throw new ArgumentNullException("output");
this.releaseDirs = releaseDirs;
this.output = output;
}
开发者ID:imtheman,项目名称:WurmAssistant3,代码行数:7,代码来源:ChangelogBuilder.cs
示例5: RecordSession
/// <summary>
/// Creates a new recording session object
/// </summary>
/// <param name="midiInput">Expected to be injected</param>
public RecordSession(IMidiInput midiInput, IOutput output, IVirtualKeyBoard virtualKeyboard)
{
_midiInput = midiInput;
_output = output;
_virtualKeyboard = virtualKeyboard;
Init();
}
开发者ID:hortonal,项目名称:MrKeys,代码行数:11,代码来源:RecordSession.cs
示例6: EvaluateFormat
public void EvaluateFormat(object current, Format format, ref bool handled, IOutput output, FormatDetails formatDetails)
{
if (format != null && format.HasNested) return;
var formatText = format != null ? format.Text : "";
TimeSpan fromTime;
if (current is TimeSpan)
{
fromTime = (TimeSpan)current;
}
else if (current is DateTime && formatText.StartsWith("timestring"))
{
formatText = formatText.Substring(10);
fromTime = DateTime.Now.Subtract((DateTime)current);
}
else
{
return;
}
var timeTextInfo = GetTimeTextInfo(formatDetails.Provider);
if (timeTextInfo == null)
{
return;
}
var formattingOptions = TimeSpanFormatOptionsConverter.Parse(formatText);
var timeString = TimeSpanUtility.ToTimeString(fromTime, formattingOptions, timeTextInfo);
output.Write(timeString, formatDetails);
handled = true;
}
开发者ID:Avatarchik,项目名称:AnimatorAccess,代码行数:29,代码来源:TimeFormatter.cs
示例7: RaceModule
public RaceModule(IRaceData raceDataStream, IOutput output)
{
Before += ctx => {
String message = String.Format("{0} : [Host: {1}] {2}",
DateTime.Now,
ctx.Request.UserHostAddress,
ctx.Request.Url.ToString());
output.WriteLine(message);
String token = ctx.Request.Headers["X-Hamstring-Token"].SingleOrDefault();
if (token == null || token.Trim() != SERVICE_TOKEN) {
output.WriteLine("=== ACCESS DENIED ===");
return HttpStatusCode.Forbidden;
}
return ctx.Response;
};
Get["/races"] = routeParameters => {
var races = raceDataStream.UpcomingRaces();
return Response.AsJson(races);
};
After += ctx => {
//http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
ctx.Response.Headers.Add("X-Powered-By", "HamstringFX.RaceService");
ctx.Response.Headers.Add("X-Version", "1.0");
};
}
开发者ID:nicholascloud,项目名称:presentations,代码行数:30,代码来源:RaceModule.cs
示例8: MsDeployPackage
public MsDeployPackage(ILog log, IShell shell, TemplateConfigurer config, IOutput output)
{
_log = log;
_shell = shell;
_config = config;
_output = output;
}
开发者ID:p-golab,项目名称:Bounce.MsDeploy,代码行数:7,代码来源:MsDeployPackage.cs
示例9: InteractiveMode
internal InteractiveMode(ICmdArguments cmdArguments, ISelectionMenu selectionMenu, IOutput output, IInteractiveModeMenuEntry[] interactiveModeMenuEntries)
{
_cmdArguments = cmdArguments;
_selectionMenu = selectionMenu;
_output = output;
_interactiveModeMenuEntries = interactiveModeMenuEntries;
}
开发者ID:vetterd,项目名称:CSBuild,代码行数:7,代码来源:InteractiveMode.cs
示例10: Execute
public bool Execute(string subject, IQueueTools tools, IOutput log)
{
IEnumerable<QueueDescriptor> queueDescriptors;
if(_options.Public)
{
queueDescriptors = tools.GetPublicQueuesByMachine(_options.Machine, TransactionFromFlags(_options.Transactional, _options.NonTransactional));
}
else
{
queueDescriptors = tools.GetPrivateQueues(_options.Machine, TransactionFromFlags(_options.Transactional, _options.NonTransactional));
}
if(!string.IsNullOrEmpty(_options.Filter))
{
queueDescriptors = Filter(_options.Filter, queueDescriptors);
}
IReporter r;
if(!string.IsNullOrEmpty(_options.DumpFile))
{
r = new JsonFileReporter(queueDescriptors, _options.DumpFile);
}
else
{
r = new LineReporter(queueDescriptors);
}
r.Report(log);
return true;
}
开发者ID:modulexcite,项目名称:qtools,代码行数:31,代码来源:QLs.cs
示例11: RunListener
public RunListener(IConsole console, IOutput output, TimingRunListener timer)
{
_console = console;
_timer = timer;
_output = output;
_summary = new FailedSpecificationsSummary(new VerboseOutput(console), console);
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:7,代码来源:RunListener.cs
示例12: CommandLine
internal CommandLine(IBuildEnvironment buildEnvironment, ICmdParser cmdParser, ICmdArguments cmdArguments, IOutput output)
{
_buildEnvironment = buildEnvironment;
_cmdParser = cmdParser;
_cmdArguments = cmdArguments;
_output = output;
}
开发者ID:vetterd,项目名称:CSBuild,代码行数:7,代码来源:CommandLine.cs
示例13: Server
public Server(
IHttpListener listener,
IEndpointProvider endpointProvider,
IOutput output,
ISoapDecoder soapDecoder,
ILogger logger,
IContentTypeProvider contentTypeProvider,
IWebRequestFactory webRequestFactory)
{
this.listener = listener;
this.endpointProvider = endpointProvider;
this.output = output;
this.soapDecoder = soapDecoder;
this.logger = logger;
this.contentTypeProvider = contentTypeProvider;
this.webRequestFactory = webRequestFactory;
try
{
listener.Prefixes.Add(endpointProvider.ServerBaseUrl);
}
catch (ArgumentException ex)
{
throw new FailException(
string.Format(
"While attempting to listen on URL '{1}': {0}",
ex.Message,
endpointProvider.ServerBaseUrl),
ex);
}
logger.Info("Listening on: {0}", endpointProvider.ServerBaseUrl);
}
开发者ID:NSWPlanning,项目名称:edais,代码行数:31,代码来源:Server.cs
示例14: SocketSniffer
public SocketSniffer(NetworkInterfaceInfo nic, Filters<IPPacket> filters, IOutput output)
{
this.outputQueue = new BlockingCollection<TimestampedData>();
this.filters = filters;
this.output = output;
this.bufferManager = new BufferManager(BUFFER_SIZE, MAX_RECEIVE);
this.receivePool = new ConcurrentStack<SocketAsyncEventArgs>();
var endPoint = new IPEndPoint(nic.IPAddress, 0);
// IPv4
this.socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
this.socket.Bind(endPoint);
this.socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true);
// Enter promiscuous mode
try
{
this.socket.IOControl(IOControlCode.ReceiveAll, BitConverter.GetBytes(1), new byte[4]);
}
catch (Exception ex)
{
Console.WriteLine("Unable to enter promiscuous mode: {0}", ex);
throw;
}
}
开发者ID:cocowalla,项目名称:Snifter,代码行数:26,代码来源:SocketSniffer.cs
示例15: OutputLogViewModel
public OutputLogViewModel(IOutput writer, OutputLog control)
{
// Store values.
Writer = writer;
Control = control;
// Create objects.
Strings = new StringLibrary();
Lines = new ObservableCollection<OutputLineViewModel>();
scrollDelay = new DelayedAction(0.1, ScrollToBottom);
// Create brushes.
dividerColor = new SolidColorBrush(Colors.Black) { Opacity = 0.1 };
lineBreakColor = new SolidColorBrush(Color.FromArgb(255, 255, 0, 228)) { Opacity = 0.4 };
// Create commands.
ClearCommand = new DelegateCommand<Button>(m => Clear(), m => IsClearButtonEnabled);
// Wire up events.
writer.WrittenTo += HandleWrittenTo;
writer.Cleared += delegate { Clear(); };
writer.BreakInserted += delegate { InsertBreak(); };
// Finish up.
UpdateLineMargin();
}
开发者ID:philcockfield,项目名称:Open.TestHarness.SL,代码行数:26,代码来源:OutputLog.ViewModel.cs
示例16: OnOutputValueChanged
/// <summary>
/// This method is called whenever the value of a output in the Outputs property changes its value.<br />
/// It updates the internal arry holding the values for the DMX channels of the universe specified.
/// </summary>
/// <param name="Output">The output.</param>
/// <exception cref="System.Exception">The OutputValueChanged event handler for ArtNet node {0} (controlling Dmx universe {1}) has been called by a sender which is not a DmxOutput..Build(Name, Universe)</exception>
/// <exception cref="System.ArgumentOutOfRangeException">ArtNet node {0} has received a update for a illegal dmx channel number ({1})..Build(Name, O.DmxChannel)</exception>
public override void OnOutputValueChanged(IOutput Output)
{
if (!(Output is DMXOutput))
{
throw new Exception("The OutputValueChanged event handler for ArtNet node {0} (controlling Dmx universe {1}) has been called by a sender which is not a DmxOutput.".Build(Name, Universe));
}
DMXOutput O = (DMXOutput)Output;
if (!O.DmxChannel.IsBetween(1, 512))
{
Log.Exception("ArtNet node {0} has received a update for a illegal dmx channel number ({1}).".Build(Name, O.DmxChannel));
throw new ArgumentOutOfRangeException("ArtNet node {0} has received a update for a illegal dmx channel number ({1}).".Build(Name, O.DmxChannel));
}
lock (UpdateLocker)
{
if (DMXData[O.DmxChannel - 1] != O.Value)
{
DMXData[O.DmxChannel - 1] = O.Value;
if (O.DmxChannel > LastDMXChannel)
{
LastDMXChannel = O.DmxChannel;
}
UpdateRequired = true;
}
}
}
开发者ID:ewingnnut,项目名称:DirectOutput,代码行数:36,代码来源:ArtNet.cs
示例17: BuildHeaderWriter
internal BuildHeaderWriter(IClock clock, IBuildEnvironment buildEnvironment, IOutput output, ICmdArguments cmdArguments)
{
_clock = clock;
_buildEnvironment = buildEnvironment;
_output = output;
_cmdArguments = cmdArguments;
}
开发者ID:vetterd,项目名称:CSBuild,代码行数:7,代码来源:BuildHeaderWriter.cs
示例18: Interpreter
public Interpreter(CPU cpu, Memory memory, Random random, IOutput output)
{
_cpu = cpu;
_memory = memory;
_random = random;
_output = output;
}
开发者ID:jvmag1,项目名称:NondeterministicVM,代码行数:7,代码来源:Interpreter.cs
示例19: SerializableWriter
private static void SerializableWriter( IOutput output, object obj )
{
SerializationInfo info = new SerializationInfo( obj.GetType( ), new FormatterConverter( ) );
( ( ISerializable )obj ).GetObjectData( info, output.Context );
output.WriteSerializationInfo( info, info.FullTypeName != obj.GetType().FullName );
}
开发者ID:johann-gambolputty,项目名称:robotbastards,代码行数:7,代码来源:CustomTypeWriterCache.cs
示例20: SlackService
public SlackService([NotNull] IOutput output, [NotNull] string webHookSubUrl)
{
if (output == null) throw new ArgumentNullException("output");
if (webHookSubUrl == null) throw new ArgumentNullException("webHookSubUrl");
this.output = output;
this.webHookSubUrl = webHookSubUrl;
}
开发者ID:imtheman,项目名称:WurmAssistant3,代码行数:7,代码来源:SlackService.cs
注:本文中的IOutput类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论