Create instance using .NET objects

easiest way is to use class initializer syntax, all DSML classes uses it preferably.

LdRequestDocument rd = new LdRequestDocument()
{
  DocumentProcessing = LdDocumentProcessing.Parallel
  ,ResponseOrder = LdResponseOrderEnum.Unordered //this is mandatory !!!!
  ,AddRequests = new LdRequestsCollection()
  {
    new LdAddRequest()
    {
      DistinguishedName="cn=18B1ADB3-52A8-4540-AEB1-C5058E152C93,cn=tokens,cn=security"
      ,Attributes = new LdAttrCollection()
      {
        new LdAttr()
        {
          Name = "objectClass"
          ,Values = new ObservableCollection<string>()
          {
            "securityTokenObject"
          }
        }
        ,new LdAttr()
        {
          Name = "owner"
          ,Values = new ObservableCollection<string>()
          {
            "drmotal"
          }
        }
      }
    }
};

 

Last edited Aug 17, 2013 at 9:04 AM by asida, version 2

Comments

No comments yet.