Expose the C# classes in JavaScript through Firebreath Framework

152 views
Skip to first unread message

goutami...@gmail.com

unread,
May 14, 2013, 7:38:45 AM5/14/13
to firebre...@googlegroups.com
Hi,

      I need to expose the C# classes in JavaScript through Firebreath Framework. 
      I have created the wrapper for the same but to invoke each method, property from C#  in JavaScript I have to instantiate the wrapper in Firebreath.
     So Could you please  suggest any centralized solution for Wrapper? and Please let me know

Thanks & Regards
GoutamiKumbhar

Taran Rampersad

unread,
May 14, 2013, 8:28:57 AM5/14/13
to firebre...@googlegroups.com

You will likely need to have your wrappers in a second dll called by fb on instantiation.

> --
>  
> ---
> You received this message because you are subscribed to the Google Groups "firebreath-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to firebreath-de...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

goutami...@gmail.com

unread,
May 29, 2013, 9:46:59 AM5/29/13
to firebre...@googlegroups.com
Hi,
   Many Thanks for your reply!!

    I have created the wrapper.But now the problem is I dont have an idea that how to expose the method from JavaScript which includes the class object as argument in it. Below is the explaination what I want to implement:

Suppose my C# Class Library includes the code:
namespace Image
{
public class DrawImage
{
   public void ShowImage(TestImage testImage)
   {
    }
}

public class TestImage
{
}

}

Here I need to call ShowImage(TestImage testImage) method from JavaScript page of the Firebreath Framework. I am trying a lot but still i didnot get the solution for the same.
    
If you have any idea related to this then please let me know.

Thanks & Regards,
GoutamiKumbhar

Richard Bateman

unread,
May 29, 2013, 10:32:15 AM5/29/13
to firebre...@googlegroups.com

You gave us the C# code.  We can't do anything with that. Theoretically, you created a wrapper in C++ that will call that class. Find the code you need to call it from C++ (figuring this out would be part of creating that wrapper you mentioned) and then we can probably help you a bit with the c++.

Let me be very clear here: FireBreath *does not* support C#.  I personally think that building a plugin that depends on C# is a bad idea, and while we're happy to try to help you with firebreath related questions you will almost certainly not find any specific help on interfacing with your C# code here, because that is not something that FireBreath supports.

I do wish you luck in your attempts,

Richard

Gaurav Raj

unread,
Jun 7, 2013, 9:20:59 AM6/7/13
to firebre...@googlegroups.com
What is the structure of this TestImage? How do you call this function from c++, then I can tell you how to expose this function to javascript.


On Thu, May 30, 2013 at 11:53 AM, goutami kumbhar <goutmi...@gmail.com> wrote:


Thanks for the Reply.



--
Gaurav Raj

Isuru Jayasooriya

unread,
Jul 16, 2013, 7:05:44 AM7/16/13
to firebre...@googlegroups.com
It might be worth if you check out the a project called UnmanagedExports (http://bit.ly/15BrexN). It allows you to expose managed .Net libraries to be used in unmanaged C++ applications.
Reply all
Reply to author
Forward
0 new messages