Browse Source

Use separate flags for partial methods and type definitions.

pull/375/head
Matt Ward 12 years ago
parent
commit
5e117d2a85
  1. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/ITypeDefinition.cs
  2. 3
      src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs
  3. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs
  4. 4
      src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs

2
src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/ITypeDefinition.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
bool? HasExtensionMethods { get; }
/// <summary>
/// Returns whether this type is partial.
/// Gets whether the partial modifier is set on this part of the type definition.
/// </summary>
bool IsPartial { get; }

3
src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs

@ -54,6 +54,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -54,6 +54,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
internal const ushort FlagAddDefaultConstructorIfRequired = 0x0040;
internal const ushort FlagHasExtensionMethods = 0x0080;
internal const ushort FlagHasNoExtensionMethods = 0x0100;
internal const ushort FlagPartialTypeDefinition = 0x0200;
// flags for AbstractUnresolvedMember:
internal const ushort FlagExplicitInterfaceImplementation = 0x0040;
internal const ushort FlagVirtual = 0x0080;
@ -64,7 +65,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -64,7 +65,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
internal const ushort FlagFieldIsFixedSize = 0x4000;
// flags for DefaultMethod:
internal const ushort FlagExtensionMethod = 0x1000;
internal const ushort FlagPartial = 0x2000;
internal const ushort FlagPartialMethod = 0x2000;
internal const ushort FlagHasBody = 0x4000;
internal const ushort FlagAsyncMethod = 0x8000;

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs

@ -115,10 +115,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -115,10 +115,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public bool IsPartial {
get { return flags[FlagPartial]; }
get { return flags[FlagPartialMethod]; }
set {
ThrowIfFrozen();
flags[FlagPartial] = value;
flags[FlagPartialMethod] = value;
}
}

4
src/Libraries/NRefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs

@ -131,10 +131,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -131,10 +131,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public bool IsPartial {
get { return flags[FlagPartial]; }
get { return flags[FlagPartialTypeDefinition]; }
set {
ThrowIfFrozen();
flags[FlagPartial] = value;
flags[FlagPartialTypeDefinition] = value;
}
}

Loading…
Cancel
Save