public static bool CheckAttribute (Attribute a, object element)
{
- TypeContainer attr = TypeManager.LookupClass (a.Type);
+ //TypeContainer attr = TypeManager.LookupClass (a.Type);
AttributeTargets targets = a.GetAttributeUsage ().ValidOn;
}
//
- // This method should be invoked to pull the IndexerName attribute from an
+ // This method should be invoked to pull the DefaultPropName attribute from an
// Indexer if it exists.
//
public static string ScanForIndexerName (EmitContext ec, Attributes opt_attrs)
continue;
//
- // So we have found an IndexerName, pull the data out.
+ // So we have found an DefaultPropName, pull the data out.
//
if (a.Arguments == null || a.Arguments [0] == null){
Error_AttributeConstructorMismatch (a.Location);
} else if (a.Type != TypeManager.dllimport_type){
((MethodBuilder) builder).SetCustomAttribute (cb);
}
- } else if (kind is ParameterBuilder) {
- if (a.Type == TypeManager.marshal_as_attr_type) {
- UnmanagedMarshal marshal = UnmanagedMarshal.DefineUnmanagedMarshal (a.UnmanagedType);
- ((ParameterBuilder) builder).SetMarshal (marshal);
- } else
- ((ParameterBuilder) builder).SetCustomAttribute (cb);
- } else if (kind is FieldBuilder) {
- ((FieldBuilder) builder).SetCustomAttribute (cb);
- } else
+ } else
throw new Exception ("Unknown kind: " + kind);
}
}
CallingConvention cc = CallingConvention.Winapi;
CharSet charset = CharSet.Ansi;
bool preserve_sig = true;
- bool exact_spelling = false;
- bool set_last_err = false;
+ /*bool exact_spelling = false;
+ bool set_last_err = false;*/
string entry_point = null;
for (int i = 0; i < named_args.Count; i++) {
charset = (CharSet) c.GetValue ();
else if (member_name == "EntryPoint")
entry_point = (string) c.GetValue ();
- else if (member_name == "SetLastError")
+ /*else if (member_name == "SetLastError")
set_last_err = (bool) c.GetValue ();
else if (member_name == "ExactSpelling")
- exact_spelling = (bool) c.GetValue ();
+ exact_spelling = (bool) c.GetValue ();*/
else if (member_name == "PreserveSig")
preserve_sig = (bool) c.GetValue ();
} else {