本文整理汇总了C#中ResponseParameters类的典型用法代码示例。如果您正苦于以下问题:C# ResponseParameters类的具体用法?C# ResponseParameters怎么用?C# ResponseParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResponseParameters类属于命名空间,在下文中一共展示了ResponseParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
byte status;
status = clientMessage.GetByte();
parameters.status = status;
Address address = null;
bool address_isNull = clientMessage.GetBoolean();
if (!address_isNull)
{
address = AddressCodec.Decode(clientMessage);
parameters.address = address;
}
string uuid = null;
bool uuid_isNull = clientMessage.GetBoolean();
if (!uuid_isNull)
{
uuid = clientMessage.GetStringUtf8();
parameters.uuid = uuid;
}
string ownerUuid = null;
bool ownerUuid_isNull = clientMessage.GetBoolean();
if (!ownerUuid_isNull)
{
ownerUuid = clientMessage.GetStringUtf8();
parameters.ownerUuid = ownerUuid;
}
byte serializationVersion;
serializationVersion = clientMessage.GetByte();
parameters.serializationVersion = serializationVersion;
return parameters;
}
示例2: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
bool response ;
response = clientMessage.GetBoolean();
parameters.response = response;
return parameters;
}
示例3: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
long response;
response = clientMessage.GetLong();
parameters.response = response;
return parameters;
}
示例4: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
string response = null;
response = clientMessage.GetStringUtf8();
parameters.response = response;
return parameters;
}
示例5: Process
public void Process(string fullPath, SegmentOp operation, ODataModel model,
string contentType = "application/atom+xml",
string accept = "application/atom+xml",
Stream inputStream = null)
{
_body = new StringBuilder();
var segments = SegmentParser.parse(fullPath, String.Empty, model);
_response = new ResponseParameters(null, Encoding.UTF8, new StringWriter(_body), 200);
var callbacks = new ProcessorCallbacks(
(rt, item) =>
{
_accessSingle.Add(new Tuple<ResourceType, object>(rt, item));
return true;
},
(rt, items) =>
{
_accessMany.Add(new Tuple<ResourceType, IEnumerable>(rt, items));
return true;
},
(rt, item) =>
{
_created.Add(new Tuple<ResourceType, object>(rt, item));
return true;
},
(rt, item) =>
{
_updated.Add(new Tuple<ResourceType, object>(rt, item));
return true;
},
(rt, item) =>
{
_removed.Add(new Tuple<ResourceType, object>(rt, item));
return true;
}
);
SegmentProcessor.Process(operation, segments,
callbacks,
new RequestParameters(
model,
model as IDataServiceMetadataProvider,
new DataServiceMetadataProviderWrapper(model),
contentType,
Encoding.UTF8,
inputStream,
new Uri("http://localhost/base/"),
new [] { accept }
),
_response
);
}
示例6: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IData response = null;
var response_isNull = clientMessage.GetBoolean();
if (!response_isNull)
{
response = clientMessage.GetData();
parameters.response = response;
}
return parameters;
}
示例7: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
SimpleEntryView<IData, IData> dataEntryView = null;
var dataEntryView_isNull = clientMessage.GetBoolean();
if (!dataEntryView_isNull)
{
dataEntryView = EntryViewCodec.Decode(clientMessage);
parameters.dataEntryView = dataEntryView;
}
return parameters;
}
示例8: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
IList<IData> list = null;
int list_size = clientMessage.GetInt();
list = new List<IData>();
for (int list_index = 0; list_index<list_size; list_index++) {
IData list_item;
list_item = clientMessage.GetData();
list.Add(list_item);
}
parameters.list = list;
return parameters;
}
示例9: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<KeyValuePair<IData,IData>> entrySet = null;
int entrySet_size = clientMessage.GetInt();
entrySet = new HashSet<KeyValuePair<IData,IData>>();
for (int entrySet_index = 0; entrySet_index<entrySet_size; entrySet_index++) {
KeyValuePair<IData,IData> entrySet_item;
entrySet_item = clientMessage.GetMapEntry();
entrySet.Add(entrySet_item);
}
parameters.entrySet = entrySet;
return parameters;
}
示例10: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<IData> set = null;
int set_size = clientMessage.GetInt();
set = new HashSet<IData>();
for (int set_index = 0; set_index<set_size; set_index++) {
IData set_item;
set_item = clientMessage.GetData();
set.Add(set_item);
}
parameters.set = set;
return parameters;
}
示例11: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IList<DistributedObjectInfo> infoCollection = null;
var infoCollection_size = clientMessage.GetInt();
infoCollection = new List<DistributedObjectInfo>();
for (var infoCollection_index = 0; infoCollection_index < infoCollection_size; infoCollection_index++)
{
DistributedObjectInfo infoCollection_item;
infoCollection_item = DistributedObjectInfoCodec.Decode(clientMessage);
infoCollection.Add(infoCollection_item);
}
parameters.infoCollection = infoCollection;
return parameters;
}
示例12: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
int readCount ;
readCount = clientMessage.GetInt();
parameters.readCount = readCount;
IList<IData> items = null;
int items_size = clientMessage.GetInt();
items = new List<IData>();
for (int items_index = 0; items_index<items_size; items_index++) {
IData items_item;
items_item = clientMessage.GetData();
items.Add(items_item);
}
parameters.items = items;
return parameters;
}
示例13: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
IList<KeyValuePair<IData, IData>> response = null;
int response_size = clientMessage.GetInt();
response = new List<KeyValuePair<IData, IData>>();
for (int response_index = 0; response_index < response_size; response_index++)
{
KeyValuePair<IData, IData> response_item;
IData response_item_key;
IData response_item_val;
response_item_key = clientMessage.GetData();
response_item_val = clientMessage.GetData();
response_item = new KeyValuePair<IData, IData>(response_item_key, response_item_val);
response.Add(response_item);
}
parameters.response = response;
return parameters;
}
示例14: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IDictionary<Address, IList<int>> partitions = null;
var partitions_size = clientMessage.GetInt();
partitions = new Dictionary<Address, IList<int>>(partitions_size);
for (var partitions_index = 0; partitions_index < partitions_size; partitions_index++)
{
Address partitions_key;
IList<int> partitions_val;
partitions_key = AddressCodec.Decode(clientMessage);
var partitions_val_size = clientMessage.GetInt();
partitions_val = new List<int>();
for (var partitions_val_index = 0; partitions_val_index < partitions_val_size; partitions_val_index++)
{
int partitions_val_item;
partitions_val_item = clientMessage.GetInt();
partitions_val.Add(partitions_val_item);
}
partitions.Add(partitions_key, partitions_val);
}
parameters.partitions = partitions;
return parameters;
}
示例15: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
return parameters;
}