0

C# Api Wrapper

Hello, I was wondering if anyone has made any progress into creating a C# wrapper for the Shotgun API? I am currently in the process of starting development for one using the XmlRpc libraries from http://www.xml-rpc.net/ and was curious to see if anyone has created one so far.

5 comments

  • 0
    Avatar
    Isaac Reuben

    Hey Joseph,

    I know of one client that was talking to Shotgun from C# a while ago, but I don't think they can share their code.  One heads up if you are implementing your own wrapper on top of the xml-rpc layer is that we're using the <nil> datatype http://en.wikipedia.org/wiki/XML-RPC, which is an extension to xml-rpc (not in the core spec).  But you gotta have your nil/null/None values.  =)

    Cheers,

    - Isaac

  • 0
    Avatar
    Joseph Thomas

    Hello Isaac,

     

    I did indeed have that issue, but it was only on an entity.create(), it would through an error

    An unhandled exception of type 'System.NullReferenceException' occurred in
    CookComputing.XmlRpcV2.dll

    Additional information: Object reference not set to an instance of an object.

     

    A work around that I did was surround the entity.create() in a try catch for a NullReferenceException, obviously there is other ways to check for this though. I am able to do entity.create and entity.find functions with no other issues at the moment though.

  • 0
    Avatar
    Nephi Sanchez

    Hey Joseph,

     

    Have you made any progress on the C# wrapper?  We've had some others express interest, and if you're game, this could be a cool project for the Shotgun Open source project:

    https://support.shotgunsoftware.com/entries/219164-announcing-the-shotgun-open-source-project

     

    Cheers,

    Nephi

  • 0
    Avatar
    Lutz Kretzschmar

    This  is almost 2 years old to the day :-) But the Open Source link does not show a C# wrapper project....

    Has anyone created this? I'm interested in talking to Shotgun from .NET without having to install and go through Python.....

     

    - Lutz

  • 0
    Avatar
    Rob Blau

    Lutz, while not a wrapper, we've gotten C# and Shotgun to be friends.  I've gotten an office plugin (for Project) together that has IronPython's dlls in it and the Shotgun python API as well.  A tiny bit of glue code allows C# to call out to IronPython and return true .NET objects.  We've used that for some pretty nice Project/Shotgun integration, and since it can all be wrapped up as a plugin there is no need to install python everywhere.

    It isn't quite a native C# Shotgun API, but after writing the Objective-C Shotgun API, I've come to the conclusion that if you can create a bridge from your language of choice to the official Python API, you'll be better off.

    -r

Please sign in to leave a comment.