RusticiSoftware / SCORMCloud_NetLibrary

A C# library to assist in the integration of the SCORM Cloud service into .Net 2.0+ applications.
http://scorm.com/scorm-solved/scorm-cloud/develop-a-scorm-cloud-app/
Other
11 stars 22 forks source link

Missing TinCanRegistrationId property #12

Open andymills opened 9 years ago

andymills commented 9 years ago

Hi, I'm not sure how to get an update committed, so thought I would just post it as an issue.

The RegistrationData class doesn't have a property to hold the TinCanRegistrationId data from the xml response.

I fixed this by adding the following code:

        //new Property
        private string _tinCanRegistrationId;

        /// <summary>
        /// Unique TinCan Identifier for this registration
        /// </summary>
        public string TinCanRegistrationId
        {
            get { return _tinCanRegistrationId; }
            private set { _tinCanRegistrationId = value; }
        }

and adding the following to the registrationData constructor:

this.TinCanRegistrationId = ((XmlElement)registrationElem
                                        .GetElementsByTagName("tinCanRegistrationId")[0])
                                        .InnerText;

Hope this is helpful.

Thanks Andy