Answered How to get the type filter for a subscription

  • 11 เมษายน 2555 4:57
    ผู้ดูแล
     
     

    Hi All,

    At the publisher end, I would like to find out the type filter for the subscription message that I receive. I am familiar with the TypeFilter field of SubscribeRequestType. The TypeFilter proprety gives an array of strings each representing a filter in the form of DSSP Action XML qualified name + DSSP Body XML qualified name (http://msdn.microsoft.com/en-us/library/microsoft.dss.servicemodel.dssp.subscriberequesttype.typefilter.aspx). However, I would like to get the types as System.Type that is corresponding to both the DSSP Action and DSSP Body XML qualified names. Can you please help me find a solution for this.

    Thanks,

    Venkat

ตอบทั้งหมด

  • 13 เมษายน 2555 17:40
    ผู้ดูแล
     
     คำตอบ

    I see that DsspServiceBase.GetTypeFilterDescription() is being used internally to generate those strings in the form "<action>+<namespace>:<name>". However, I see no inverse APIs for parsing these back into Types.

    The best suggestion I can come up with would be to build your own dictionary by running the filters you expect through GetTypeFilterDescription() up front.

    Not brilliant, but I hope that helps!

  • 16 เมษายน 2555 21:08
    ผู้ดูแล
     
     
    Thanks so much Ashley Feniello for your help. I tried whatever you said and it works..