コード例 #1
0
        public uint Get(Composition <T> parameter)
        {
            var start       = _start.Get(parameter);
            var composition = new Composition <T>(parameter.Output, parameter.Instance, parameter.Index + start);
            var content     = _content.Get(composition);
            var result      = start + content +
                              _finish.Get(new Composition(parameter.Output, composition.Index + content));

            return(result);
        }
コード例 #2
0
        public Array <byte> Get(T parameter)
        {
            var source = _lease((int)_instruction.Get(parameter));
            var length = _instruction.Get(new Composition <T>(source, parameter));
            var result = new byte[length];

            Buffer.BlockCopy(source, 0, result, 0, (int)length);
            source.Clear(length);
            _return(source, false);
            return(result);
        }
コード例 #3
0
        public async Task Get(Input <T> parameter)
        {
            using (var session = _storage.Session(_instruction.Get(parameter.Instance)))
            {
                var operation = parameter.Stream
                                .WriteAsync(session.Store,
                                            0,
                                            (int)_instruction.Get(new Composition <T>(session.Store,
                                                                                      parameter.Instance)),
                                            parameter.Cancel);

                if (!operation.IsCompleted)
                {
                    await operation;
                }
            }
        }
コード例 #4
0
ファイル: IInstruction.cs プロジェクト: pvandasler/Super.NET
 public uint Get(T parameter) => _instruction.Get(parameter) + 2;