Patent ID: 8250533

Claim:
In a managed code framework, a method of filtering which metadata of an object is returned to a code segment when the code segment has requested the metadata via reflection at runtime, the method comprising: receiving a request, via reflection, to view metadata of an object, the request being received from a first code segment of an application that is executing within an application domain of a process; determining a context of the first code segment; filtering the metadata of the object based on the context of the first code segment so that metadata that is not relevant to the execution of the first code segment is filtered; returning the filtered metadata to the first code segment to enable the first code segment to customize the execution of the application within the application domain; receiving a second request, via reflection, to view the metadata of the object, the second request being received from a second code segment of an application that is executing within the application domain; determining the context of the second code segment, including determining that the context of the second code segment is different than the context of the first code segment; filtering the metadata of the object based on the context of the second code segment so that metadata that is not relevant to the execution of the second code segment is filtered; and returning the filtered metadata to the second code segment to enable the second code segment to customize the execution of the application within the application domain, wherein the filtered metadata returned to the second code segment is different than the filtered metadata returned to the first code segment.