Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public BasicAuthEventArgs(HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(null, false, null, statusCode, statusDescription)
 {
     this.Result = result;
 }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 public BasicAuthEventArgs(HttpStatusCode statusCode, string statusDescription, Schema.Identity result)
     : base(null, false, null, statusCode, statusDescription)
 {
     this.Result = result;
 }
Exemplo n.º 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;
 }