JsBridge icon indicating copy to clipboard operation
JsBridge copied to clipboard

Implementing multiple interfaces only exposes the 1st interface on Javascript

Open leanalcabasa opened this issue 8 years ago • 1 comments

Hi,

Not sure if this is an issue, or there is a different way of doing this. We have an existing class that implements from a Base Class, which we also want to implement interface that will be used in Javascript.

For example, the ff:

`public class Foo : BaseFoo, IFoo { public string BaseName { get;set; } public string GenericName { get;set; } public string FooName { get; set; } }

public class BaseFoo : IBaseFoo, IGenericFoo { public string BaseName { get; set; } public string GenericName { get; set; } }

public interface IFoo { string FooName { get; set; } }`

When we use Foo in Javascript, we can only use BaseName and not GenericName and FooName. If we switch IGenericFoo and IBaseFoo order, we can use GenericName but not BaseName and FooName. Basically, whatever is the first interface is the only one exposed.

Is this supported? Or is there a different way of implementing what we want to do?

Thank you

leanalcabasa avatar Sep 06 '16 15:09 leanalcabasa

Found out that it is intended behavior. https://msdn.microsoft.com/en-us/library/hh779077.aspx

leanalcabasa avatar Sep 19 '16 02:09 leanalcabasa