private FetClassProperty GetFetClassProperty() { try { string instanceId = _instanceIdentify.Id.ToString(); string fetclassId = _fetclassIdentify.Id; Dictionary <string, string> args = new Dictionary <string, string>(); args.Add(HttpCommands.cstArgNameCommand, HttpCommands.cstArgCmdGetFetClassProperty); args.Add(HttpCommands.cstArgInstanceId, instanceId); args.Add(HttpCommands.cstArgFetClassId, fetclassId); string url = HttpCommands.GetCatalogUrlPage(_uri, HttpCommands.cstCatalogPage); url = HttpCommands.GetCatalogUrl(url, args); object obj = GetObjectFromHttpStream.GetObject(url); FetClassProperty pro = obj as FetClassProperty; if (pro == null) { throw new Exception("获取要素类\"" + _name + "\"的属性对象失败。"); } return(pro); } catch (Exception ex) { Log.WriterException(ex); return(null); } }
private void GenerateUrl() { Dictionary <string, string> args = new Dictionary <string, string>(); args.Add(HttpCommands.cstArgNameCommand, HttpCommands.cstArgCmdReadFeatures); args.Add(HttpCommands.cstArgInstanceId, _instanceIdentify.Id.ToString()); args.Add(HttpCommands.cstArgFetClassId, _fetclassIdentify.Id); args.Add(HttpCommands.cstArgMinX, "{0}"); args.Add(HttpCommands.cstArgMinY, "{1}"); args.Add(HttpCommands.cstArgMaxX, "{2}"); args.Add(HttpCommands.cstArgMaxY, "{3}"); string url = HttpCommands.GetCatalogUrlPage(_uri, HttpCommands.cstCatalogPage); url = HttpCommands.GetCatalogUrl(url, args); _readGridUrl = url; }
public override void EndRead() { try { string url = HttpCommands.GetCatalogUrlPage(_uri, HttpCommands.cstCatalogPage); Dictionary <string, string> args = new Dictionary <string, string>(); args.Add(HttpCommands.cstArgNameCommand, HttpCommands.cstArgCmdEndRead); args.Add(HttpCommands.cstArgInstanceId, _instanceIdentify.Id.ToString()); args.Add(HttpCommands.cstArgFetClassId, _fetclassIdentify.Id); url = HttpCommands.GetCatalogUrl(url, args); object isOK = GetObjectFromHttpStream.GetObject(url); if (isOK is RequestIsFailed) { Log.WriterError("ServerDataSource", "EndRead(" + _instanceIdentify.Name + "," + _fetclassIdentify.Name + ")", (isOK as RequestIsFailed).Msg); } } finally { _readIsFinished = true; } }