- Timestamp:
- 08/29/12 10:36:35 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs
r8531 r8536 293 293 foreach (var genericArgument in typeGenericArguments) { 294 294 if (otherGenericArguments[i].IsGenericParameter) { 295 //check class contraint on generic type parameter296 if (otherGenericArguments[i].GenericParameterAttributes.HasFlag(GenericParameterAttributes.ReferenceTypeConstraint))297 if (!genericArgument.IsClass) return false;298 299 //check default constructor constraint on generic type parameter300 if (otherGenericArguments[i].GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint))301 if (!genericArgument.IsValueType && genericArgument.GetConstructor(Type.EmptyTypes) == null) return false;302 303 295 foreach (var constraint in otherGenericArguments[i].GetGenericParameterConstraints()) 304 296 if (!constraint.IsAssignableFrom(genericArgument)) return false;
Note: See TracChangeset
for help on using the changeset viewer.