No announcement yet.

Reflection: .GetType().FullName, isn't there the namespace part missing?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Reflection: .GetType().FullName, isn't there the namespace part missing?

    I get this:
    • System.Int32
    • HTMLInputElement
    ... but would rather expect this:
    • System.Int32
    • Bridge.Html5.HTMLInputElement
    Am I missing something?

  • #2
    Any feedback on topic above would be appreciated. Thanks


    • #3
      Can't say I would agree with you here. The HTMLInputElement is not executing in a "namespace". Yes, it just happens to be configured "in a" namespace on the C# side, but when .GetType().FullName is executed in JavaScript, I would not expect Bridge.Html5 to be a part of that string value.


      • #4
        I'm not sure I follow your reasoning of 'is not executed in a namespace'.
        >> Gets the fully qualified name of the type, including its namespace but not its assembly.

        new Bridge.Html5.HTMLInputElement()
        ... mean that the namespace of 'HTMLInputElement' is 'Bridge.Html5' and hence should be part of Type.FullName?

        Last edited by DierkDroth; 2017-03-27 @ 06:55 AM.


        • #5
          I've added this thread to our Monday team meeting agenda. We will discuss.

          I need to sleep on this. It's been a long week.


          • #6
            Thanks, appreciated. Sleep tight :-)


            • #7
              The .GetType().FullName just doesn't apply to anything in the Bridge.Html5.

              The Types within Bridge.Htm5 do not reside in a namespace during execution. Yes, of course, those types exist within a namespace during compilation, but there's no namespace metadata available during runtime. Only the type name is available, but those types do not exist in namespaces.

              In a web browser, what namespace does an HTMLInputElement exist within?

              One alternative would be to create a component library that wrapped all HTML*Element types. For example, new CompanyX.Input(). Then fully qualified type info would be available.


              • #8
                Understand. Thanks

                Right now this does not come into our way. I'll keep that 'limitation' in mind as we moved forward and would get back to you in case it would cause trouble...