The XlangMessage class has a GetProeprtyValue method to return the value of a context property.
The method takes in a type as a parameter and returns an object.
Returning an object makes perfect sense as the type of the context property you're reading can vary, but what is the type as the input parameter?
It is not obvious at first but when you create a property schema, as with pretty much everything in BizTalk that compiles into a class. The class would reside in a .net namespace defined in the namespace property of the property schema. The name of the class would be the name you set in the type name property. (both exist in the property page accesible by slecting the xsd file of the property schema and switching to the properties pane.
Further more, in the case of property schemas, each property is compiled into a class as well. These classes will reside in the same .net namespace as the property schema and have a class name as the name of the element.
This is, of course, true for your own custom context properties as well as the system context properties such as the various adapter's context properties.
Most of the system context properties are defined in the assembly Microsoft.BizTalk.GlobalPropertySchemas. You can easily see the various namespaces and classes if you look it up in Visual Studio's object browser.
So - back to GetProeprtyValue - it all comes together now - the parameter to the function is the .net type of the property it's value you want to get - if you want to use the File adpaters ReceivedFileName property add a reference to Microsoft.BizTalk.GlobalPropertySchemas and pass typeof(FILE.ReceivedFileName) as the paremeter.
If you have created a property called MyProperty in a property schema called MyContext than you will need to pass in typeof(MyContext.MyProperty) as the parameter