本文整理汇总了C#中Params.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Params.Clone方法的具体用法?C# Params.Clone怎么用?C# Params.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _load
private void _load (
CJSRequestGetType getType,
Params bioPrms,
AjaxRequestDelegate callback,
JsonStoreFilter locate,
Int64? pageSize,
Int64? startFrom,
String selection
) {
var v_selection = selection;
var v_locate = locate;
if (pageSize.HasValue)
this.PageSize = pageSize.Value;
if (startFrom.HasValue)
this.StartFrom = startFrom.Value;
if (this.AjaxMng == null)
throw new EBioException("Свойство \"ajaxMng\" должно быть определено!");
if (String.IsNullOrEmpty(this.BioCode))
throw new EBioException("Свойство \"bioCode\" должно быть определено!");
this._doBeforLoadData(bla => {
if (bla.Cancel) {
return;
}
if (bioPrms != null) {
if (this.BioParams == null)
this.BioParams = bioPrms.Clone() as Params;
else {
this.BioParams.Clear();
this.BioParams = this.BioParams.Merge(bioPrms, true);
}
} else {
if (this.BioParams == null)
this.BioParams = new Params();
}
var isMetadataObsolete = false;
var isFirstLoad = false;
this._detectIsFirstLoad(this.BioCode, this.BioParams, ref isMetadataObsolete, ref isFirstLoad);
if (isFirstLoad) {
this.StartFrom = 0;
}
this._lastRequestedBioCode = this.BioCode;
JsonStoreSort sortDefinition = null;
if (!isMetadataObsolete && (this.DS0 != null)) {
var cv = (this.DS0 as ICollectionView);
if (cv != null)
sortDefinition = this._genJSSortDefinition(cv.SortDescriptions);
}
this._lastRequestedParams = (Params)this.BioParams.Clone();
var reqst = new JsonStoreRequestGet {
BioCode = this.BioCode,
getType = getType,
BioParams = this.BioParams,
Prms = null,
Packet = new JsonStoreData {
Limit = this.PageSize,
Start = this.StartFrom,
IsFirstLoad = isFirstLoad,
IsMetadataObsolete = isMetadataObsolete,
Locate = v_locate
},
Sort = sortDefinition,
selection = v_selection,
Callback = (sndr, args) => {
try {
Type rowType = null;
var rq = (JsonStoreRequest)args.Request;
var rsp = args.Response as JsonStoreResponse;
if (rsp != null) {
if ((rsp.packet != null) && (rsp.packet.Rows != null)) {
if (BioGlobal.Debug) {
if (rsp.Ex != null)
throw new EBioException("Unhandled exception!!!! silent:[" + rq.Silent + "]", rsp.Ex);
}
if (rq.Packet.IsMetadataObsolete) {
this._metadata = rsp.packet.MetaData;
var fldDefs = _creFldDefsRmt(this._metadata);
rowType = this._creRowType(fldDefs);
this.DS0 = this._creDSInst(rowType);
}
this._doOnJsonStoreResponseSuccess(rq, rsp);
this._loadDS(rowType, rsp);
this._doOnJsonStoreDSLoaded(this.DS0, rq, rsp);
if (rq.Packet.Locate != null)
this._lastLocatedRow = this._locateInternal(rq.Packet.Locate);
} else {
if (BioGlobal.Debug) {
var m = "Bad response: ";
if (rsp.packet == null)
m = m + "rsp.packet=null;";
else if (rsp.packet.Rows == null)
//.........这里部分代码省略.........