示例#1
0
        private BasicAuthEventArgs GetArgsFromAuthResponse(HttpStatusCode statusCode, string statusDescription, string authResult)
        {
            Schema.Identity id = null;

            //parse the result
            id = ParseIdentityV1Response(authResult);

            //create and return args containing the result
            return(new BasicAuthEventArgs(statusCode, statusDescription, id));
        }
示例#2
0
        private Schema.Identity ParseIdentityV1Response(string xmlData)
        {
            Schema.Identity identity = null;

            if (xmlData != null && xmlData.Length > 0)
            {
                try
                {
                    //deserialize the xml into our FamilySearch object
                    identity = new Schema.Identity();
                    identity = (Schema.Identity)XmlSerlializeHelper.Load(identity, new System.IO.StringReader(xmlData));
                }
                catch (System.Exception e)
                {
                    throw new Exception(e.Message);
                }
            }

            return(identity);
        }
示例#3
0
        private Schema.Identity ParseIdentityV1Response(string xmlData)
        {
            Schema.Identity identity = null;

            if (xmlData != null && xmlData.Length > 0)
            {
                try
                {
                    //deserialize the xml into our FamilySearch object
                    identity = new Schema.Identity();
                    identity = (Schema.Identity)XmlSerlializeHelper.Load(identity, new System.IO.StringReader(xmlData));
                }
                catch (System.Exception e)
                {
                    throw new Exception(e.Message);
                }
            }

            return identity;
        }
示例#4
0
 public BasicAuthEventArgs(HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(null, false, null, statusCode, statusDescription)
 {
     this.Result = result;
 }
示例#5
0
 public BasicAuthEventArgs(Exception error, bool cancelled, object userState, HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(error, cancelled, userState, statusCode, statusDescription)
 {
     this.Result = result;
 }
示例#6
0
 public BasicAuthEventArgs(HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(null, false, null, statusCode, statusDescription)
 {
     this.Result = result;
 }
示例#7
0
 public BasicAuthEventArgs(Exception error, bool cancelled, object userState, HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(error, cancelled, userState, statusCode, statusDescription)
 {
     this.Result = result;
 }