Latest post Tue, Nov 15 2016 7:16 PM by handtruck. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Fri, Sep 16 2016 12:10 AM

    • handtruck
    • Not Ranked
    • Joined on Mon, Apr 21 2014
    • Posts 56
    • Points 605

    Sharing Assets and Archive Objects in .NET

    When adding Service References in Visual Studio, you get similar objects and methods for both the Archive.wsdl and the Assets.wsdl (for example, CreateFolders and GetFileDetails - and their associated types).  Is there any way to use the same objects for both within a project, so code doesn't have to be duplicated.

    It looks like this is not possible in Visual Studio because they have diffenent Namespaces, but not sure if I'm missing something, or someone has any other ideas.

    Thanks!

  • Wed, Nov 9 2016 7:30 PM In reply to

    • robg
    • Top 500 Contributor
    • Joined on Fri, Nov 4 2005
    • Tewksbury, MA
    • Posts 494
    • Points 5,625
    • Avid Developer Moderator
      Avid Employee

    Re: Sharing Assets and Archive Objects in .NET

    handtruck,

    Sorry for the late reply. Although there are ways to override the name of the namespace for web service references in visual studio, this will probably lead to issues in the calls to Archive and Asset functions because they are seperate APIs.

    However, in order to reduce replicated code you could create some classes that abstract this functionality. This would hide the details of the APIs, and making it cleaner for the calling code.

    - Rob

     

  • Tue, Nov 15 2016 7:16 PM In reply to

    • handtruck
    • Not Ranked
    • Joined on Mon, Apr 21 2014
    • Posts 56
    • Points 605

    Re: Sharing Assets and Archive Objects in .NET

    Thanks for getting back to me!

    I have achieved this mainly through the use of the "dynamic" keywork available in c#.  It's a little dicey with knowing what I have at any given time, but since they are using the same calls, it's been working.

Page 1 of 1 (3 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller