Dev2.Runtime.ServiceModel.Data.WebSource.WebSource C# (CSharp) Method

WebSource() public method

public WebSource ( System.Xml.Linq.XElement xml ) : System
xml System.Xml.Linq.XElement
return System
        public WebSource(XElement xml)
            : base(xml)
        {
            ResourceType = ResourceType.WebSource;
            AuthenticationType = AuthenticationType.Anonymous;

            var properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
            {
                { "Address", string.Empty },
                { "DefaultQuery", string.Empty },
                { "AuthenticationType", string.Empty },
                { "UserName", string.Empty },
                { "Password", string.Empty }
            };

            var conString = xml.AttributeSafe("ConnectionString");
            var connectionString = conString.CanBeDecrypted() ? DpapiWrapper.Decrypt(conString) : conString;
            ParseProperties(connectionString, properties);
            Address = properties["Address"];
            DefaultQuery = properties["DefaultQuery"];
            UserName = properties["UserName"];
            Password = properties["Password"];

            AuthenticationType authType;
            AuthenticationType = Enum.TryParse(properties["AuthenticationType"], true, out authType) ? authType : AuthenticationType.Windows;
        }

Same methods

WebSource::WebSource ( ) : System