/// <summary> /// This constructor accepts XrML Publish License template as a parameter. It parses the XrRML document /// and initializes class based on that. /// </summary> public UnsignedPublishLicense(string publishLicenseTemplate) :this () { SecurityHelper.DemandRightsManagementPermission(); if (publishLicenseTemplate == null) { throw new ArgumentNullException("publishLicenseTemplate"); } using(IssuanceLicense issuanceLicense = new IssuanceLicense( DateTime.MinValue, // validFrom, - default DateTime.MaxValue, // validUntil, - default null, // referralInfoName, null, // referralInfoUrl, null, // owner, publishLicenseTemplate, SafeRightsManagementHandle.InvalidHandle, // boundLicenseHandle, _contentId, // contentId, null, // grantCollection null, // Localized Name Description pairs collection null, // Application Specific Data Dictionary 0, // validity interval days null)) // revocation point info { // update our instance data based on the parsed information issuanceLicense.UpdateUnsignedPublishLicense(this); } }
/// <summary> /// This constructor accepts Signed XrML Publish License as a parameter. /// It decrypts and parses parses the XrRML document and initializes class based on that. /// </summary> internal UnsignedPublishLicense(SafeRightsManagementHandle boundLicenseHandle, string publishLicenseTemplate) :this () { Invariant.Assert(!boundLicenseHandle.IsInvalid); Invariant.Assert(publishLicenseTemplate != null); using(IssuanceLicense issuanceLicense = new IssuanceLicense( DateTime.MinValue, // validFrom, - default DateTime.MaxValue, // validUntil, - default null, // referralInfoName, null, // referralInfoUrl, null, // owner, publishLicenseTemplate, boundLicenseHandle, // boundLicenseHandle, _contentId, // contentId, null, // grantCollection null, // Localized Name Description pairs collection null, // Application Specific Data Dictionary 0, // validity interval days null)) // revocation point info { // update our instance data based on the parsed information issuanceLicense.UpdateUnsignedPublishLicense(this); } }