• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Output类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Output类属于命名空间,在下文中一共展示了Output类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Transaction

 public Transaction(int version, Input[] inputs, Output[] outputs, uint lockTime)
 {
     Version = version;
     Inputs = inputs;
     Outputs = outputs;
     LockTime = lockTime;
 }
开发者ID:tuxcanfly,项目名称:Paymetheus,代码行数:7,代码来源:Transaction.cs


示例2: Link

 public Link(Input input, Output output)
 {
     this.Input = input;
     this.Output = output;
     this.Weight = new Random().NextDouble();
     Console.WriteLine("Weight: " + Weight);
 }
开发者ID:Berdir,项目名称:danwi,代码行数:7,代码来源:Link.cs


示例3: GetPaymentRequest

        public ByteString GetPaymentRequest(string finalAccount, ulong amount)
        {
            PaymentDetails paymentDetails = new PaymentDetails();
            paymentDetails.Network = isMainNet ? "main" : "test";
            paymentDetails.Time = GetTimestamp(DateTime.UtcNow);
            paymentDetails.Expires = GetTimestamp(DateTime.UtcNow.AddHours(1));
            paymentDetails.Memo = $"Funding Openchain account {finalAccount}";

            Output paymentOutput = new Output();
            paymentOutput.Amount = amount;
            paymentOutput.Script = Google.Protobuf.ByteString.CopyFrom(NBitcoin.Script.CreateFromDestinationAddress(destinationAddress).ToBytes());

            Output dataOutput = new Output();
            dataOutput.Amount = dustValue;
            dataOutput.Script = Google.Protobuf.ByteString.CopyFrom(
                new[] { (byte)OpcodeType.OP_RETURN }.Concat(Op.GetPushOp(Encoding.UTF8.GetBytes("OG" + finalAccount)).ToBytes()).ToArray());

            paymentDetails.Outputs.Add(paymentOutput);
            paymentDetails.Outputs.Add(dataOutput);

            PaymentRequest request = new PaymentRequest();
            request.SerializedPaymentDetails = paymentDetails.ToByteString();
            request.PkiType = "none";

            return new ByteString(request.ToByteArray());
        }
开发者ID:openchain,项目名称:sidechain,代码行数:26,代码来源:PaymentRequestManager.cs


示例4: Calculate

        public Parameters Calculate(Parameters parameters)
        {
            var input = ParametersMapper.Map<Input>(parameters);
            var output = new Output();

            output.Vk = input.MaxVk;

            var gammaN = input.Gamma / input.Fi;

            output.Qkr = 60 * input.F * input.Fi * input.MaxVk * gammaN;

            output.Kp = input.Q / output.Qkr;

            output.C = 1 - output.Kp;

            output.Vc = output.Vk * output.C;

            // h' и полином
            var x = output.C;
            var h = input.A2 * x * x + input.A1 * x + input.A0;

            output.MinH = h*10*input.F*input.Fi2/input.MinH;
            output.MaxH = h * 10 * input.F * input.Fi2 / input.MaxH;

            return ParametersMapper.Map(output);
        }
开发者ID:SaprSu,项目名称:SaprSu,代码行数:26,代码来源:Mode1.cs


示例5: ExtractDiz

 private void ExtractDiz()
 {
     Log.Debug("ExtractDiz");
     System.IO.FileInfo fileInfo = new System.IO.FileInfo(race.RaceFile);
     if (fileInfo.Exists)
     {
         Log.Debug("Race file exists...");
         return;
     }
     bool dizFound = race.CurrentRaceData.UploadFile.ExtractFromArchive(".diz");
     if (Config.ExtractNfoFromZip)
     {
         race.CurrentRaceData.UploadFile.ExtractFromArchive(".nfo");
     }
     if (dizFound)
     {
         DataParserDiz dataParserDiz = new DataParserDiz(race);
         dataParserDiz.Parse();
         dataParserDiz.Process();
         return;
     }
     Log.Debug("DIZ file not found in ZIP");
     race.IsValid = false;
     Output output = new Output(race);
     output
         .Client(Config.ClientHead)
         .Client(Config.ClientFileNameNoDiz)
         .Client(Config.ClientFoot);
 }
开发者ID:trippleflux,项目名称:jezatools,代码行数:29,代码来源:DataParserZip.cs


示例6: 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


示例7: FastEncoder

 public FastEncoder(bool doGZip) {
     this.usingGzip = doGZip;
     this.inputWindow = new FastEncoderWindow();
     this.inputBuffer = new DeflateInput();
     this.output = new Output();
     this.currentMatch = new Match();
 }
开发者ID:cooclsee,项目名称:hprose-dotnet,代码行数:7,代码来源:FastEncoder.cs


示例8: Add_RSSI

        private void Add_RSSI()
        {
            string file = File.ReadAllText("combined_routers_C.txt");
                string[] lines = file.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);

                Output output = new Output();
                output.router_rssis = new List<int>(8);

                for (int i = 0; i < 8; i++)
                {
                    output.router_rssis.Add(int.MaxValue);
                }

                foreach (string line in lines)
                {
                    string line2 = line.Trim();
                    string[] fields = line2.Split(new char[] { '\t' });
                    try
                    {
                        if (fields[1] != string.Empty)
                        {
                            int nnVector = int.Parse(fields[1]) - 1;
                            int rssi_val = int.Parse(fields[2]);
                            output.router_rssis[nnVector] = rssi_val;
                        }
                        else
                        {
                            x = double.Parse(fields[3]);
                            y = double.Parse(fields[4]);
                        }

                        bool full = true;
                        foreach (int rssi in output.router_rssis)
                        {
                            if (rssi.Equals(int.MaxValue))
                            {
                                full = false;
                                break;
                            }
                        }
                        if (full)
                        {
                            output.x = x;
                            output.y = y;

                            outputs.Add(output);
                            output = new Output();
                            output.router_rssis = new List<int>(8);
                            for (int i = 0; i < 8; i++)
                            {
                                output.router_rssis.Add(int.MaxValue);
                            }
                        }
                    }
                    catch
                    {
                    }
                }
        }
开发者ID:sagarbatchu,项目名称:rssilocalizer,代码行数:59,代码来源:frmMain.cs


示例9: Main

        static void Main(string[] args)
        {
            var controller = new IndexController();
            controller.IndexFile(@"data\TestData.txt");

            var output = new Output();
            output.Print(controller.IndexedLines);
        }
开发者ID:uzigula,项目名称:Styles,代码行数:8,代码来源:Program.cs


示例10: print

	  public override void print(Output @out)
	  {
		@out.println("while true do");
		@out.indent();
		Statement.printSequence(@out, statements);
		@out.dedent();
		@out.print("end");
	  }
开发者ID:MaxxWyndham,项目名称:unluacNet,代码行数:8,代码来源:AlwaysLoop.cs


示例11: Input

        public Input(JObject i)
        {
            JObject prevOut = i["prev_out"] as JObject;
            if (prevOut != null)
                PreviousOutput = new Output(prevOut, true);

            Sequence = (long)i["sequence"];
            ScriptSignature = (string)i["script"];
        }
开发者ID:KMHouk,项目名称:api-v1-client-csharp,代码行数:9,代码来源:Input.cs


示例12: WalletTransaction

 public WalletTransaction(Transaction transaction, Sha256Hash hash, Input[] inputs, Output[] outputs, Amount? fee, DateTimeOffset seenTime)
 {
     Hash = hash;
     Inputs = inputs;
     Outputs = outputs;
     Fee = fee;
     Transaction = transaction;
     SeenTime = seenTime;
 }
开发者ID:tuxcanfly,项目名称:Paymetheus,代码行数:9,代码来源:WalletTransaction.cs


示例13: WorkSheetOptions

 public WorkSheetOptions(Worksheet w, Output o)
 {
     //
     // The InitializeComponent() call is required for Windows Forms designer support.
     //
     worksheet = w;
     InitializeComponent();
     initializeValues();
     parent = o;
 }
开发者ID:xueliu,项目名称:MSC_Generator,代码行数:10,代码来源:WorkSheetOptions.cs


示例14: print

	  public override void print(Output @out)
	  {
		@out.print("local ");
		@out.print(decls[0].name);
		for(int i = 1; i < decls.Count; i++)
		{
		  @out.print(", ");
		  @out.print(decls[i].name);
		}
	  }
开发者ID:MaxxWyndham,项目名称:unluacNet,代码行数:10,代码来源:Declare.cs


示例15: Env

        protected Env(Stack<Ruleset> frames, Dictionary<string, Type> functions)
        {
            Frames = frames ?? new Stack<Ruleset>();
            Output = new Output(this);

            _plugins = new List<IPlugin>();
            _functionTypes = functions ?? new Dictionary<string, Type>();

            if (_functionTypes.Count == 0)
                AddCoreFunctions();
        }
开发者ID:WouterBos,项目名称:dotless,代码行数:11,代码来源:Env.cs


示例16: Display

        public string Display(Output action)
        {
            var s = new StringBuilder();
            s.Append("{weekFrom: ").Append(WeekFrom).Append(", trips: [");

            var tripStrings = new List<string>();
            ForEach((trip) => tripStrings.Add(action.Invoke(trip)));
            s.Append(String.Join(", ", tripStrings.ToArray()));

            return s.Append("]}").ToString();
        }
开发者ID:Innazvrtn,项目名称:OOP,代码行数:11,代码来源:WeeklyBalance.cs


示例17: Calculate

 public Parameters Calculate(Parameters parameters)
 {
     var input = ParametersMapper.Map<Input>(parameters);
     var output = new Output();
     output.C = 1 / output.K0;
     var x = output.C;
     var h = input.A2 * x * x + input.A1 * x + input.A0;
     output.MaxH = h * 10 * input.F * input.Fi2 / (input.MaxH * input.Fi);
     output.MinH = h * 10 * input.F * input.Fi2 / (input.MinH * input.Fi);
     return ParametersMapper.Map<Output>(output);
 }
开发者ID:SaprSu,项目名称:SaprSu,代码行数:11,代码来源:Mode13.cs


示例18: Transaction

        public Transaction(int version, Input[] inputs, Output[] outputs, uint lockTime)
        {
            if (inputs == null)
                throw new ArgumentNullException(nameof(inputs));
            if (outputs == null)
                throw new ArgumentNullException(nameof(outputs));

            Version = version;
            Inputs = inputs;
            Outputs = outputs;
            LockTime = lockTime;
        }
开发者ID:btcsuite,项目名称:Paymetheus,代码行数:12,代码来源:Transaction.cs


示例19: StoryController

        public StoryController(IStory story, Output output, CommandPrompt commandPrompt)
        {
            if (story == null) throw new ArgumentNullException("story");
            if (output == null) throw new ArgumentNullException("output");
            if (commandPrompt == null) throw new ArgumentNullException("commandPrompt");

            Context.Output = output;
            Context.CommandPrompt = commandPrompt;
            Context.Story = story;
            Context.Parser = new Parser();

        }
开发者ID:jphamilton,项目名称:Adventure.Net,代码行数:12,代码来源:StoryController.cs


示例20: SubtractAsync

        public override async Task<IMessage<Output>> SubtractAsync(IMessage<PairedInput> request, CancellationToken ct)
        {
            PairedInput req = request.Convert<PairedInput>().Payload.Deserialize();
            var res = new Output
            {
                Result = req.First - req.Second,
                TraceId = req.TraceId
            };
            await Task.Delay(DelayMilliseconds);

            return Message.FromPayload(res);
        }
开发者ID:csdahlberg,项目名称:bond,代码行数:12,代码来源:CalculatorService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OutputArray类代码示例发布时间:2022-05-24
下一篇:
C# OsmSharp类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap