コード例 #1
0
		string GetColorInfoType(BlockStructureKind blockKind) {
			switch (blockKind) {
			case BlockStructureKind.Namespace:		return ThemeClassificationTypeNameKeys.BlockStructureNamespace;
			case BlockStructureKind.Type:			return ThemeClassificationTypeNameKeys.BlockStructureType;
			case BlockStructureKind.Module:			return ThemeClassificationTypeNameKeys.BlockStructureModule;
			case BlockStructureKind.ValueType:		return ThemeClassificationTypeNameKeys.BlockStructureValueType;
			case BlockStructureKind.Interface:		return ThemeClassificationTypeNameKeys.BlockStructureInterface;
			case BlockStructureKind.Method:			return ThemeClassificationTypeNameKeys.BlockStructureMethod;
			case BlockStructureKind.Accessor:		return ThemeClassificationTypeNameKeys.BlockStructureAccessor;
			case BlockStructureKind.AnonymousMethod:return ThemeClassificationTypeNameKeys.BlockStructureAnonymousMethod;
			case BlockStructureKind.Constructor:	return ThemeClassificationTypeNameKeys.BlockStructureConstructor;
			case BlockStructureKind.Destructor:		return ThemeClassificationTypeNameKeys.BlockStructureDestructor;
			case BlockStructureKind.Operator:		return ThemeClassificationTypeNameKeys.BlockStructureOperator;
			case BlockStructureKind.Conditional:	return ThemeClassificationTypeNameKeys.BlockStructureConditional;
			case BlockStructureKind.Loop:			return ThemeClassificationTypeNameKeys.BlockStructureLoop;
			case BlockStructureKind.Property:		return ThemeClassificationTypeNameKeys.BlockStructureProperty;
			case BlockStructureKind.Event:			return ThemeClassificationTypeNameKeys.BlockStructureEvent;
			case BlockStructureKind.Try:			return ThemeClassificationTypeNameKeys.BlockStructureTry;
			case BlockStructureKind.Catch:			return ThemeClassificationTypeNameKeys.BlockStructureCatch;
			case BlockStructureKind.Filter:			return ThemeClassificationTypeNameKeys.BlockStructureFilter;
			case BlockStructureKind.Finally:		return ThemeClassificationTypeNameKeys.BlockStructureFinally;
			case BlockStructureKind.Fault:			return ThemeClassificationTypeNameKeys.BlockStructureFault;
			case BlockStructureKind.Lock:			return ThemeClassificationTypeNameKeys.BlockStructureLock;
			case BlockStructureKind.Using:			return ThemeClassificationTypeNameKeys.BlockStructureUsing;
			case BlockStructureKind.Fixed:			return ThemeClassificationTypeNameKeys.BlockStructureFixed;
			case BlockStructureKind.Switch:			return ThemeClassificationTypeNameKeys.BlockStructureSwitch;
			case BlockStructureKind.Case:			return ThemeClassificationTypeNameKeys.BlockStructureCase;
			case BlockStructureKind.LocalFunction:	return ThemeClassificationTypeNameKeys.BlockStructureLocalFunction;
			case BlockStructureKind.Other:			return ThemeClassificationTypeNameKeys.BlockStructureOther;
			case BlockStructureKind.Xml:			return ThemeClassificationTypeNameKeys.BlockStructureXml;
			case BlockStructureKind.Xaml:			return ThemeClassificationTypeNameKeys.BlockStructureXaml;
			default:
				Debug.Fail($"Unknown block kind: {blockKind}");
				return ThemeClassificationTypeNameKeys.BlockStructureOther;
			}
		}
コード例 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="blockTop">Start block span</param>
 /// <param name="blockBottom">End block span</param>
 /// <param name="blockKind">Block kind</param>
 public BlockStructureData(SnapshotSpan blockTop, SnapshotSpan blockBottom, BlockStructureKind blockKind)
 {
     Top       = blockTop;
     Bottom    = blockBottom;
     BlockKind = blockKind;
 }
コード例 #3
0
		Pen GetPen(BlockStructureKind blockKind) => GetLineColorInfo(GetColorInfoType(blockKind)).Pen;
コード例 #4
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="blockTop">Start block span</param>
		/// <param name="blockBottom">End block span</param>
		/// <param name="blockKind">Block kind</param>
		public BlockStructureData(SnapshotSpan blockTop, SnapshotSpan blockBottom, BlockStructureKind blockKind) {
			Top = blockTop;
			Bottom = blockBottom;
			BlockKind = blockKind;
		}