SuperMap.Web.Mapping.DynamicLayer.GetImageSource C# (CSharp) Method

GetImageSource() protected method

${mapping_DynamicISLayer_method_GetImageSource_D}
protected GetImageSource ( OnImageSourceCompleted onCompleted ) : void
onCompleted OnImageSourceCompleted ${mapping_DynamicISLayer_method_GetImageSource_param_onCompleted}
return void
        protected virtual void GetImageSource(OnImageSourceCompleted onCompleted)
        {
            string imgUrl = this.GetImageUrl();
            if (string.IsNullOrEmpty(imgUrl))
            {
                onCompleted(null);
            }
            else
            {
                if (imgUrl.Length > 0)
                {
            #if SILVERLIGHT
                    if (Credential.CREDENTIAL.GetUrlParameters() != null)
                    {
                        imgUrl += "&" + Credential.CREDENTIAL.GetUrlParameters();
                    }

            #endif
                    BitmapImage imgSrc = null;
                    imgSrc = new BitmapImage
                      {
                          UriSource = new Uri(imgUrl, UriKind.Absolute),
                      };

                    onCompleted(imgSrc);
                }
            }
        }