コード例 #1
0
        private static Operation <StringValue, Timestamp> ForError(string name, ProtoStatus error, OperationsClient client)
        {
            var operation = new Operation
            {
                Done  = true,
                Name  = name,
                Error = error
            };

            return(new Operation <StringValue, Timestamp>(operation, client));
        }
コード例 #2
0
        private static Operation <StringValue, Timestamp> ForResult(string name, string value, OperationsClient client)
        {
            var operation = new Operation
            {
                Done     = true,
                Name     = name,
                Response = Any.Pack(new StringValue {
                    Value = value
                })
            };

            return(new Operation <StringValue, Timestamp>(operation, client));
        }