本文整理汇总了TypeScript中dojo/_base/lang.exists函数的典型用法代码示例。如果您正苦于以下问题:TypeScript exists函数的具体用法?TypeScript exists怎么用?TypeScript exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exists函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
constructor: function (args) {
if (args) {
declare.safeMixin(this, args);
}
if (lang.exists("Sequence", this)) {
this.store = new Store({
wuid: this.Wuid,
sequence: this.Sequence,
isComplete: this.isComplete()
});
} else if (lang.exists("Name", this) && lang.exists("NodeGroup", this)) {
this.store = new Store({
wuid: this.Wuid,
cluster: this.NodeGroup,
name: this.Name,
isComplete: true
});
} else {
this.store = new Store({
wuid: this.Wuid,
cluster: this.Cluster,
name: this.Name,
isComplete: true
});
}
},
开发者ID:richardkchapman,项目名称:HPCC-Platform,代码行数:26,代码来源:ESPResult.ts
示例2: function
arrayUtil.some(item.Clusters.ClusterQueryState, function (cqs, idx) {
if (lang.exists("Errors", cqs) && cqs.Errors || cqs.State !== "Available") {
ErrorCount++;
StatusMessage = context.i18n.SuspendedByCluster;
return false;
}
if (lang.exists("MixedNodeStates", cqs) && cqs.MixedNodeStates === true) {
StatusMessage = context.i18n.MixedNodeStates;
MixedNodeStates = true;
}
});
开发者ID:richardkchapman,项目名称:HPCC-Platform,代码行数:11,代码来源:ESPQuery.ts
示例3: switch
return this._send(service, action, params).then(function (response) {
if (handleAs === "json") {
if (lang.exists("Exceptions.Source", response) && !params.skipExceptions) {
var severity = params.suppressExceptionToaster ? "Info" : "Error";
var source = service + "." + action;
if (lang.exists("Exceptions.Exception", response) && response.Exceptions.Exception.length === 1) {
switch (source) {
case "WsWorkunits.WUInfo":
if (response.Exceptions.Exception[0].Code === 20080) {
severity = "Info";
}
break;
case "WsWorkunits.WUQuery":
if (response.Exceptions.Exception[0].Code === 20081) {
severity = "Info";
}
break;
case "WsWorkunits.WUCDebug":
if (response.Exceptions.Exception[0].Code === -10) {
severity = "Info";
}
break;
case "FileSpray.GetDFUWorkunit":
if (response.Exceptions.Exception[0].Code === 20080) {
severity = "Info";
}
break;
case "WsDfu.DFUInfo":
if (response.Exceptions.Exception[0].Code === 20038) {
severity = "Info";
}
break;
case "WsWorkunits.WUUpdate":
if (response.Exceptions.Exception[0].Code === 20049) {
severity = "Error";
}
break;
}
}
topic.publish("hpcc/brToaster", {
Severity: severity,
Source: source,
Exceptions: response.Exceptions.Exception
});
}
}
return response;
},
开发者ID:AttilaVamos,项目名称:HPCC-Platform,代码行数:48,代码来源:ESPRequest.ts
示例4: onFetchGraphXgmml
}).then(function (response) {
if (lang.exists("WUGetGraphResponse.Graphs.ECLGraphEx", response) && response.WUGetGraphResponse.Graphs.ECLGraphEx.length) {
if (subGraphId) {
if (!context.subgraphs) {
context.subgraphs = {};
}
if (!context.subgraphs[idx + "." + subGraphId]) {
context.subgraphs[idx + "." + subGraphId] = {};
}
context.subgraphs[idx + "." + subGraphId].xgmml = "<graph>" + response.WUGetGraphResponse.Graphs.ECLGraphEx[0].Graph + "</graph>";
onFetchGraphXgmml(context.subgraphs[idx + "." + subGraphId].xgmml, context.subgraphs[idx + "." + subGraphId].svg);
} else {
context.graphs[idx].xgmml = response.WUGetGraphResponse.Graphs.ECLGraphEx[0].Graph;
onFetchGraphXgmml(context.graphs[idx].xgmml, context.graphs[idx].svg);
}
} else {
topic.publish("hpcc/brToaster", {
Severity: "Error",
Source: "ESPWorkunit.fetchGraphXgmml",
Exceptions: [
{ Message: context.i18n.FetchingXGMMLFailed }
]
});
onFetchGraphXgmml("", "");
}
});
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:26,代码来源:ESPWorkunit.ts
示例5: function
_TpEclAgentsSetter: function (TpEclAgents) {
if (lang.exists("TpEclAgent", TpEclAgents)) {
arrayUtil.forEach(TpEclAgents.TpEclAgent, function (item, idx) {
this.appendChild(createTreeItem(TpEclAgent, item.Name, this, item));
}, this);
}
},
开发者ID:AttilaVamos,项目名称:HPCC-Platform,代码行数:7,代码来源:ESPTopology.ts
示例6: function
}).then(function (response) {
var newRows = [];
if (lang.exists("DFUXRefOrphanFilesQueryResponse.DFUXRefOrphanFilesQueryResult.File", response)) {
var results = response.DFUXRefOrphanFilesQueryResponse.DFUXRefOrphanFilesQueryResult.File
if (results.length) {
arrayUtil.forEach(results, function (row, idx) {
newRows.push({
Name: row.Partmask,
Modified: row.Modified,
PartsFound: row.Partsfound,
TotalParts: row.Numparts,
Size: row.Size
});
});
} else if (results.Partmask) {
newRows.push({
Name: results.Partmask,
Modified: results.Modified,
PartsFound: results.Partsfound,
TotalParts: results.Numparts,
Size: results.Size
});
}
}
return newRows;
});
开发者ID:AttilaVamos,项目名称:HPCC-Platform,代码行数:26,代码来源:WsDFUXref.ts
示例7:
}).then(function (response) {
var retVal = [];
if (lang.exists("TpServiceQueryResponse.ServiceList", response)) {
retVal.push(createTreeItem(Services, "Services", context.rootItem, response.TpServiceQueryResponse.ServiceList));
}
return retVal;
})
开发者ID:AttilaVamos,项目名称:HPCC-Platform,代码行数:7,代码来源:ESPTopology.ts
示例8: function
load: function (response) {
if (lang.exists("WUActionResponse.ActionResults.WUActionResult", response)) {
var wuMap = {};
arrayUtil.forEach(workunits, function (item, index) {
wuMap[item.Wuid] = item;
});
arrayUtil.forEach(response.WUActionResponse.ActionResults.WUActionResult, function (item, index) {
if (item.Result.indexOf("Failed:") === 0) {
topic.publish("hpcc/brToaster", {
Severity: "Error",
Source: "WsWorkunits.WUAction",
Exceptions: [{ Source: item.Action + " " + item.Wuid, Message: item.Result }]
});
} else {
var wu = wuMap[item.Wuid];
if (actionType === "delete" && item.Result === "Success") {
wu.set("StateID", 999);
wu.set("State", "not found");
} else if (wu.refresh) {
wu.refresh();
}
}
});
}
if (callback && callback.load) {
callback.load(response);
}
},
开发者ID:GordonSmith,项目名称:HPCC-Platform,代码行数:29,代码来源:WsWorkunits.ts
注:本文中的dojo/_base/lang.exists函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论