Parent

Caricature::ClrClassDescriptor

Describes a CLR class type. it collects the properties and methods on an instance as well as on a static level

Public Instance Methods

initialize_class_members_for(klass) click to toggle source

collects all the static members of the provided CLR class type

# File lib/caricature/clr/descriptor.rb, line 42
    def initialize_class_members_for(klass)
      clr_type = klass.to_clr_type

      methods = Workarounds::ReflectionHelper.get_class_methods(clr_type)
      properties = Workarounds::ReflectionHelper.get_class_properties(clr_type)

      @class_members += methods.collect  { |mi| MemberDescriptor.new(mi.name.underscore, mi.return_type, false) }
      @class_members += properties.collect { |pi| MemberDescriptor.new(pi.name.underscore, pi.property_type, false) }
      @class_members += properties.select{|pi| pi.can_write }.collect { |pi| MemberDescriptor.new("#{pi.name.underscore}=", nil, false) }
    end
initialize_instance_members_for(klass) click to toggle source

collects all the instance members of the provided CLR class type

# File lib/caricature/clr/descriptor.rb, line 30
    def initialize_instance_members_for(klass)
      clr_type = klass.to_clr_type

      methods = Workarounds::ReflectionHelper.get_instance_methods(clr_type)
      properties = Workarounds::ReflectionHelper.get_instance_properties(clr_type)

      @instance_members += methods.collect { |mi| MemberDescriptor.new(mi.name.underscore, mi.return_type) }
      @instance_members += properties.collect { |pi| MemberDescriptor.new(pi.name.underscore, pi.property_type) }
      @instance_members += properties.select{|pi| pi.can_write }.collect { |pi| MemberDescriptor.new("#{pi.name.underscore}=", nil) }
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.