Я использую Rustici Scorm Cloud API для создания URL-адреса для предварительного просмотра некоторых учебных материалов:
Код создает объект LaunchLinkRequestSchema с заполненным строковым полем RedirectOnExitUrl
. Тем не менее, я получаю InvalidDataException в момент создания:
Код
var l = new LaunchLinkRequestSchema()
{
RedirectOnExitUrl = "https://www.example.com"
};
Исключение
System.IO.InvalidDataException HResult=0x80131501
Message=RedirectOnExitUrl is a required property for LaunchLinkRequestSchema and cannot be null
Source=Com.RusticiSoftware.Cloud.V2
StackTrace:
at Com.RusticiSoftware.Cloud.V2.Model.LaunchLinkRequestSchema..ctor(Nullable`1 Expiry, String RedirectOnExitUrl, Nullable`1 Tracking, String StartSco, String Culture, String CssUrl, List`1 LearnerTags, List`1 CourseTags, List`1 RegistrationTags, List`1 Additionalvalues)
at ScormAPI_Tests.Program.Main() in
C:\...\Program.cs:line 26
![enter image description here](https://i.stack.imgur.com/Ygyis.png)
![enter image description here](https://i.stack.imgur.com/q85wM.png)
Я не понимаю, почему я вижу эту ошибку, когда свойству присваивается значение. Кто-нибудь может объяснить, что здесь происходит?