private void WebClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { try { Collection <Type> knowTypes = new Collection <Type>(); knowTypes.Add(typeof(EsriFieldType)); knowTypes.Add(typeof(EsriGeometryType)); DataContractJsonSerializer dcjs = new DataContractJsonSerializer(typeof(ArcGISLayerInfo), knowTypes); ArcGISLayerInfo layerInfo = dcjs.ReadObject(e.Result) as ArcGISLayerInfo; e.Result.Close(); e.Result.Dispose(); if (InfoReady != null) { layerInfo.IsReady = true; InfoReady(this, new ArcGISLayerInfoEventArgs(layerInfo)); } } catch (Exception ex) { if (InfoReady != null) { InfoReady(this, new ArcGISLayerInfoEventArgs(ex.Message)); } } }
public QueryTool(ArcGISQueryLayer queryLayer, ArcGISLayerInfo layerInfo) { this.QueryLayer = queryLayer; this.LayerInfo = layerInfo; }
public ArcGISLayerInfoEventArgs(ArcGISLayerInfo layerInfo) { this._layerInfo = layerInfo; }