Repository: fuse-open/fuse-studio
Branch: master
Commit: ddabfafb3deb
Files: 4307
Total size: 22.3 MB
Directory structure:
gitextract_85chjwgr/
├── .appveyor.yml
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .npmignore
├── .unoconfig
├── .vscode/
│ ├── .gitignore
│ └── settings.json
├── 3rdparty/
│ ├── ColorPicker/
│ │ ├── AlphaDisplay.xaml
│ │ ├── AlphaDisplay.xaml.cs
│ │ ├── CheckerBoardBrush.xaml
│ │ ├── ColorDisplay.xaml
│ │ ├── ColorDisplay.xaml.cs
│ │ ├── ColorModels/
│ │ │ ├── CMY/
│ │ │ │ ├── CMYDisplay.xaml
│ │ │ │ ├── CMYDisplay.xaml.cs
│ │ │ │ ├── CMYModel.cs
│ │ │ │ ├── Cyan.cs
│ │ │ │ └── Magenta.cs
│ │ │ ├── CMYK/
│ │ │ │ ├── Black.cs
│ │ │ │ ├── CMYKDisplay.xaml
│ │ │ │ ├── CMYKDisplay.xaml.cs
│ │ │ │ ├── CMYKModel.cs
│ │ │ │ ├── Cyan.cs
│ │ │ │ ├── Magenta.cs
│ │ │ │ └── Yellow.cs
│ │ │ ├── ColorComponent.cs
│ │ │ ├── ColorModel.cs
│ │ │ ├── HSB/
│ │ │ │ ├── Brightness.cs
│ │ │ │ ├── HSBModel.cs
│ │ │ │ ├── HsbDisplay.xaml
│ │ │ │ ├── HsbDisplay.xaml.cs
│ │ │ │ ├── Hue.cs
│ │ │ │ ├── Saturation.cs
│ │ │ │ └── Yellow.cs
│ │ │ ├── Lab/
│ │ │ │ ├── A.cs
│ │ │ │ ├── B.cs
│ │ │ │ ├── LabDisplay.xaml
│ │ │ │ ├── LabDisplay.xaml.cs
│ │ │ │ ├── LabModel.cs
│ │ │ │ └── Lightness.cs
│ │ │ ├── NormalComponent.cs
│ │ │ └── RGB/
│ │ │ ├── Blue.cs
│ │ │ ├── Green.cs
│ │ │ ├── RGBModel.cs
│ │ │ ├── Red.cs
│ │ │ ├── RgbDisplay.xaml
│ │ │ └── RgbDisplay.xaml.cs
│ │ ├── ColorPicker.csproj
│ │ ├── ColorSelector.xaml
│ │ ├── ColorSelector.xaml.cs
│ │ ├── EventArgs.cs
│ │ ├── ExtensionMethods/
│ │ │ ├── ByteExtensionMethods.cs
│ │ │ ├── ColorExtensionMethods.cs
│ │ │ └── DoubleExtensionMethods.cs
│ │ ├── HexDisplay.xaml
│ │ ├── HexDisplay.xaml.cs
│ │ ├── NewCurrent.xaml
│ │ ├── NewCurrent.xaml.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── SliderResources.xaml
│ ├── ColorPickerControls/
│ │ ├── Chips/
│ │ │ ├── ColorChip.xaml
│ │ │ ├── ColorChip.xaml.cs
│ │ │ ├── ForegroundBackgroundChip.xaml
│ │ │ └── ForegroundBackgroundChip.xaml.cs
│ │ ├── ColorPickerControls.csproj
│ │ ├── Dialogs/
│ │ │ ├── ColorPickerFullDialog.xaml
│ │ │ ├── ColorPickerFullDialog.xaml.cs
│ │ │ ├── ColorPickerFullWithAlphaDialog.xaml
│ │ │ ├── ColorPickerFullWithAlphaDialog.xaml.cs
│ │ │ ├── ColorPickerStandardDialog.xaml
│ │ │ ├── ColorPickerStandardDialog.xaml.cs
│ │ │ ├── ColorPickerStandardWithAlphaDialog.xaml
│ │ │ ├── ColorPickerStandardWithAlphaDialog.xaml.cs
│ │ │ ├── EColorDialog.cs
│ │ │ └── IColorDialog.cs
│ │ ├── Pickers/
│ │ │ ├── ColorPickerFull.xaml
│ │ │ ├── ColorPickerFull.xaml.cs
│ │ │ ├── ColorPickerFullWithAlpha.xaml
│ │ │ ├── ColorPickerFullWithAlpha.xaml.cs
│ │ │ ├── ColorPickerStandard.xaml
│ │ │ ├── ColorPickerStandard.xaml.cs
│ │ │ ├── ColorPickerStandardWithAlpha.xaml
│ │ │ └── ColorPickerStandardWithAlpha.xaml.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── packages.config
│ └── NRefactory/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── ICSharpCode.NRefactory/
│ │ ├── Analysis/
│ │ │ ├── AbiComparer.cs
│ │ │ ├── SymbolCollector.cs
│ │ │ ├── TypeGraph.cs
│ │ │ └── TypeGraphNode.cs
│ │ ├── Completion/
│ │ │ ├── CompletionCategory.cs
│ │ │ ├── CompletionExtensionMethods.cs
│ │ │ ├── DisplayFlags.cs
│ │ │ ├── FrameworkLookup.cs
│ │ │ ├── ICompletionData.cs
│ │ │ ├── IEntityCompletionData.cs
│ │ │ ├── IParameterDataProvider.cs
│ │ │ └── IVariableCompletionData.cs
│ │ ├── Documentation/
│ │ │ ├── DocumentationComment.cs
│ │ │ ├── GetPotentiallyNestedClassTypeReference.cs
│ │ │ ├── IDocumentationProvider.cs
│ │ │ ├── IdStringMemberReference.cs
│ │ │ ├── IdStringProvider.cs
│ │ │ └── XmlDocumentationProvider.cs
│ │ ├── Editor/
│ │ │ ├── IDocument.cs
│ │ │ ├── IDocumentLine.cs
│ │ │ ├── ISegment.cs
│ │ │ ├── ITextAnchor.cs
│ │ │ ├── ITextPasteHandler.cs
│ │ │ ├── ITextSource.cs
│ │ │ ├── ReadOnlyDocument.cs
│ │ │ ├── StringBuilderDocument.cs
│ │ │ ├── StringTextSource.cs
│ │ │ ├── TextChangeEventArgs.cs
│ │ │ ├── TextSourceVersionProvider.cs
│ │ │ └── UnicodeNewline.cs
│ │ ├── IAnnotatable.cs
│ │ ├── ICSharpCode.NRefactory.csproj
│ │ ├── PatternMatching/
│ │ │ ├── AnyNode.cs
│ │ │ ├── AnyNodeOrNull.cs
│ │ │ ├── Backreference.cs
│ │ │ ├── BacktrackingInfo.cs
│ │ │ ├── Choice.cs
│ │ │ ├── INode.cs
│ │ │ ├── Match.cs
│ │ │ ├── NamedNode.cs
│ │ │ ├── OptionalNode.cs
│ │ │ ├── Pattern.cs
│ │ │ └── Repeat.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── GlobalAssemblyInfo.cs
│ │ ├── Refactoring/
│ │ │ ├── IssueMarker.cs
│ │ │ └── Severity.cs
│ │ ├── Role.cs
│ │ ├── Semantics/
│ │ │ ├── AmbiguousResolveResult.cs
│ │ │ ├── ArrayAccessResolveResult.cs
│ │ │ ├── ArrayCreateResolveResult.cs
│ │ │ ├── ByReferenceResolveResult.cs
│ │ │ ├── ConstantResolveResult.cs
│ │ │ ├── Conversion.cs
│ │ │ ├── ConversionResolveResult.cs
│ │ │ ├── ErrorResolveResult.cs
│ │ │ ├── ForEachResolveResult.cs
│ │ │ ├── InitializedObjectResolveResult.cs
│ │ │ ├── InvocationResolveResult.cs
│ │ │ ├── LocalResolveResult.cs
│ │ │ ├── MemberResolveResult.cs
│ │ │ ├── NamedArgumentResolveResult.cs
│ │ │ ├── NamespaceResolveResult.cs
│ │ │ ├── OperatorResolveResult.cs
│ │ │ ├── ResolveResult.cs
│ │ │ ├── SizeOfResolveResult.cs
│ │ │ ├── ThisResolveResult.cs
│ │ │ ├── TypeIsResolveResult.cs
│ │ │ ├── TypeOfResolveResult.cs
│ │ │ ├── TypeResolveResult.cs
│ │ │ └── UnknownMemberResolveResult.cs
│ │ ├── TextLocation.cs
│ │ ├── TypeSystem/
│ │ │ ├── Accessibility.cs
│ │ │ ├── AnonymousType.cs
│ │ │ ├── ArrayType.cs
│ │ │ ├── AssemblyLoader.cs
│ │ │ ├── AssemblyQualifiedTypeName.cs
│ │ │ ├── ByReferenceType.cs
│ │ │ ├── ComHelper.cs
│ │ │ ├── DefaultSolutionSnapshot.cs
│ │ │ ├── DomRegion.cs
│ │ │ ├── EntityType.cs
│ │ │ ├── Error.cs
│ │ │ ├── FullTypeName.cs
│ │ │ ├── IAmbience.cs
│ │ │ ├── IAssembly.cs
│ │ │ ├── IAttribute.cs
│ │ │ ├── ICodeContext.cs
│ │ │ ├── ICompilation.cs
│ │ │ ├── IConstantValue.cs
│ │ │ ├── IEntity.cs
│ │ │ ├── IEvent.cs
│ │ │ ├── IField.cs
│ │ │ ├── IFreezable.cs
│ │ │ ├── IInterningProvider.cs
│ │ │ ├── IMember.cs
│ │ │ ├── IMethod.cs
│ │ │ ├── INamedElement.cs
│ │ │ ├── INamespace.cs
│ │ │ ├── IParameter.cs
│ │ │ ├── IParameterizedMember.cs
│ │ │ ├── IProjectContent.cs
│ │ │ ├── IProperty.cs
│ │ │ ├── ISolutionSnapshot.cs
│ │ │ ├── ISupportsInterning.cs
│ │ │ ├── ISymbol.cs
│ │ │ ├── IType.cs
│ │ │ ├── ITypeDefinition.cs
│ │ │ ├── ITypeParameter.cs
│ │ │ ├── ITypeReference.cs
│ │ │ ├── IUnresolvedFile.cs
│ │ │ ├── IVariable.cs
│ │ │ ├── Implementation/
│ │ │ │ ├── AbstractFreezable.cs
│ │ │ │ ├── AbstractResolvedEntity.cs
│ │ │ │ ├── AbstractResolvedMember.cs
│ │ │ │ ├── AbstractResolvedTypeParameter.cs
│ │ │ │ ├── AbstractType.cs
│ │ │ │ ├── AbstractUnresolvedEntity.cs
│ │ │ │ ├── AbstractUnresolvedMember.cs
│ │ │ │ ├── AccessorOwnerMemberReference.cs
│ │ │ │ ├── BaseTypeCollector.cs
│ │ │ │ ├── BlobReader.cs
│ │ │ │ ├── DefaultAssemblyReference.cs
│ │ │ │ ├── DefaultAttribute.cs
│ │ │ │ ├── DefaultMemberReference.cs
│ │ │ │ ├── DefaultParameter.cs
│ │ │ │ ├── DefaultResolvedEvent.cs
│ │ │ │ ├── DefaultResolvedField.cs
│ │ │ │ ├── DefaultResolvedMethod.cs
│ │ │ │ ├── DefaultResolvedProperty.cs
│ │ │ │ ├── DefaultResolvedTypeDefinition.cs
│ │ │ │ ├── DefaultResolvedTypeParameter.cs
│ │ │ │ ├── DefaultUnresolvedAssembly.cs
│ │ │ │ ├── DefaultUnresolvedAttribute.cs
│ │ │ │ ├── DefaultUnresolvedEvent.cs
│ │ │ │ ├── DefaultUnresolvedField.cs
│ │ │ │ ├── DefaultUnresolvedMethod.cs
│ │ │ │ ├── DefaultUnresolvedParameter.cs
│ │ │ │ ├── DefaultUnresolvedProperty.cs
│ │ │ │ ├── DefaultUnresolvedTypeDefinition.cs
│ │ │ │ ├── DefaultUnresolvedTypeParameter.cs
│ │ │ │ ├── DefaultVariable.cs
│ │ │ │ ├── DummyTypeParameter.cs
│ │ │ │ ├── ExplicitInterfaceImplementationMemberReference.cs
│ │ │ │ ├── FullNameAndTypeParameterCount.cs
│ │ │ │ ├── GetClassTypeReference.cs
│ │ │ │ ├── GetMembersHelper.cs
│ │ │ │ ├── KnownTypeCache.cs
│ │ │ │ ├── MergedNamespace.cs
│ │ │ │ ├── MinimalCorlib.cs
│ │ │ │ ├── NestedTypeReference.cs
│ │ │ │ ├── ResolvedAttributeBlob.cs
│ │ │ │ ├── SimpleCompilation.cs
│ │ │ │ ├── SimpleConstantValue.cs
│ │ │ │ ├── SimpleInterningProvider.cs
│ │ │ │ ├── SpecializedEvent.cs
│ │ │ │ ├── SpecializedField.cs
│ │ │ │ ├── SpecializedMember.cs
│ │ │ │ ├── SpecializedMethod.cs
│ │ │ │ ├── SpecializedProperty.cs
│ │ │ │ ├── SpecializingMemberReference.cs
│ │ │ │ ├── TypeParameterReference.cs
│ │ │ │ ├── TypeWithElementType.cs
│ │ │ │ ├── UnknownType.cs
│ │ │ │ ├── UnresolvedAttributeBlob.cs
│ │ │ │ ├── UnresolvedSecurityDeclarationBlob.cs
│ │ │ │ └── VoidTypeDefinition.cs
│ │ │ ├── InheritanceHelper.cs
│ │ │ ├── IntersectionType.cs
│ │ │ ├── KnownTypeReference.cs
│ │ │ ├── NullableType.cs
│ │ │ ├── ParameterListComparer.cs
│ │ │ ├── ParameterizedType.cs
│ │ │ ├── PointerType.cs
│ │ │ ├── ProjectReference.cs
│ │ │ ├── ReflectionHelper.cs
│ │ │ ├── ReflectionNameParseException.cs
│ │ │ ├── SimpleTypeResolveContext.cs
│ │ │ ├── SpecialType.cs
│ │ │ ├── TaskType.cs
│ │ │ ├── TopLevelTypeName.cs
│ │ │ ├── TypeKind.cs
│ │ │ ├── TypeParameterSubstitution.cs
│ │ │ ├── TypeSystemExtensions.cs
│ │ │ └── TypeVisitor.cs
│ │ └── Utils/
│ │ ├── 7BitEncodedInts.cs
│ │ ├── BitVector16.cs
│ │ ├── BusyManager.cs
│ │ ├── CSharpPrimitiveCast.cs
│ │ ├── CacheManager.cs
│ │ ├── CallbackOnDispose.cs
│ │ ├── ComparableList.cs
│ │ ├── CompositeFormatStringParser/
│ │ │ ├── CompositeFormatStringParser.cs
│ │ │ ├── FormatItem.cs
│ │ │ ├── FormatStringSegmentBase.cs
│ │ │ ├── IFormatStringError.cs
│ │ │ ├── IFormatStringSegment.cs
│ │ │ └── TextSegment.cs
│ │ ├── EmptyList.cs
│ │ ├── ExtensionMethods.cs
│ │ ├── FastSerializer.cs
│ │ ├── GraphVizGraph.cs
│ │ ├── ImmutableStack.cs
│ │ ├── KeyComparer.cs
│ │ ├── LazyInit.cs
│ │ ├── MultiDictionary.cs
│ │ ├── Platform.cs
│ │ ├── ProjectedList.cs
│ │ ├── ReferenceComparer.cs
│ │ └── TreeTraversal.cs
│ ├── ICSharpCode.NRefactory.CSharp/
│ │ ├── Analysis/
│ │ │ ├── AnnotationNames.cs
│ │ │ ├── ControlFlow.cs
│ │ │ ├── DeclarationSpace/
│ │ │ │ ├── LocalDeclarationSpace.cs
│ │ │ │ └── LocalDeclarationSpaceVisitor.cs
│ │ │ ├── DefiniteAssignmentAnalysis.cs
│ │ │ ├── NullValueAnalysis.cs
│ │ │ ├── NullValueStatus.cs
│ │ │ ├── ReachabilityAnalysis.cs
│ │ │ └── SemanticHighlightingVisitor.cs
│ │ ├── Ast/
│ │ │ ├── AstNode.cs
│ │ │ ├── AstNodeCollection.cs
│ │ │ ├── AstType.cs
│ │ │ ├── CSharpModifierToken.cs
│ │ │ ├── CSharpTokenNode.cs
│ │ │ ├── CSharpUtil.cs
│ │ │ ├── ComposedType.cs
│ │ │ ├── DepthFirstAstVisitor.cs
│ │ │ ├── DocumentationReference.cs
│ │ │ ├── ErrorNode.cs
│ │ │ ├── Expressions/
│ │ │ │ ├── AnonymousMethodExpression.cs
│ │ │ │ ├── AnonymousTypeCreateExpression.cs
│ │ │ │ ├── ArrayCreateExpression.cs
│ │ │ │ ├── ArrayInitializerExpression.cs
│ │ │ │ ├── AsExpression.cs
│ │ │ │ ├── AssignmentExpression.cs
│ │ │ │ ├── BaseReferenceExpression.cs
│ │ │ │ ├── BinaryOperatorExpression.cs
│ │ │ │ ├── CastExpression.cs
│ │ │ │ ├── CheckedExpression.cs
│ │ │ │ ├── ConditionalExpression.cs
│ │ │ │ ├── DefaultValueExpression.cs
│ │ │ │ ├── DirectionExpression.cs
│ │ │ │ ├── ErrorExpression.cs
│ │ │ │ ├── Expression.cs
│ │ │ │ ├── IdentifierExpression.cs
│ │ │ │ ├── IndexerExpression.cs
│ │ │ │ ├── InvocationExpression.cs
│ │ │ │ ├── IsExpression.cs
│ │ │ │ ├── LambdaExpression.cs
│ │ │ │ ├── MemberReferenceExpression.cs
│ │ │ │ ├── NamedArgumentExpression.cs
│ │ │ │ ├── NamedExpression.cs
│ │ │ │ ├── NullReferenceExpression.cs
│ │ │ │ ├── ObjectCreateExpression.cs
│ │ │ │ ├── ParenthesizedExpression.cs
│ │ │ │ ├── PointerReferenceExpression.cs
│ │ │ │ ├── PrimitiveExpression.cs
│ │ │ │ ├── QueryExpression.cs
│ │ │ │ ├── SizeOfExpression.cs
│ │ │ │ ├── StackAllocExpression.cs
│ │ │ │ ├── ThisReferenceExpression.cs
│ │ │ │ ├── TypeOfExpression.cs
│ │ │ │ ├── TypeReferenceExpression.cs
│ │ │ │ ├── UnaryOperatorExpression.cs
│ │ │ │ ├── UncheckedExpression.cs
│ │ │ │ └── UndocumentedExpression.cs
│ │ │ ├── GeneralScope/
│ │ │ │ ├── Attribute.cs
│ │ │ │ ├── AttributeSection.cs
│ │ │ │ ├── Comment.cs
│ │ │ │ ├── Constraint.cs
│ │ │ │ ├── DelegateDeclaration.cs
│ │ │ │ ├── ExternAliasDeclaration.cs
│ │ │ │ ├── NamespaceDeclaration.cs
│ │ │ │ ├── NewLineNode.cs
│ │ │ │ ├── PreProcessorDirective.cs
│ │ │ │ ├── TextNode.cs
│ │ │ │ ├── TypeDeclaration.cs
│ │ │ │ ├── TypeParameterDeclaration.cs
│ │ │ │ ├── UsingAliasDeclaration.cs
│ │ │ │ ├── UsingDeclaration.cs
│ │ │ │ └── WhitespaceNode.cs
│ │ │ ├── IAstVisitor.cs
│ │ │ ├── Identifier.cs
│ │ │ ├── IdentifierExpressionBackreference.cs
│ │ │ ├── MemberType.cs
│ │ │ ├── Modifiers.cs
│ │ │ ├── NodeType.cs
│ │ │ ├── ObservableAstVisitor.cs
│ │ │ ├── PrimitiveType.cs
│ │ │ ├── Roles.cs
│ │ │ ├── SimpleType.cs
│ │ │ ├── Statements/
│ │ │ │ ├── BlockStatement.cs
│ │ │ │ ├── BreakStatement.cs
│ │ │ │ ├── CheckedStatement.cs
│ │ │ │ ├── ContinueStatement.cs
│ │ │ │ ├── DoWhileStatement.cs
│ │ │ │ ├── EmptyStatement.cs
│ │ │ │ ├── ExpressionStatement.cs
│ │ │ │ ├── FixedStatement.cs
│ │ │ │ ├── ForStatement.cs
│ │ │ │ ├── ForeachStatement.cs
│ │ │ │ ├── GotoStatement.cs
│ │ │ │ ├── IfElseStatement.cs
│ │ │ │ ├── LabelStatement.cs
│ │ │ │ ├── LockStatement.cs
│ │ │ │ ├── ReturnStatement.cs
│ │ │ │ ├── Statement.cs
│ │ │ │ ├── SwitchStatement.cs
│ │ │ │ ├── ThrowStatement.cs
│ │ │ │ ├── TryCatchStatement.cs
│ │ │ │ ├── UncheckedStatement.cs
│ │ │ │ ├── UnsafeStatement.cs
│ │ │ │ ├── UsingStatement.cs
│ │ │ │ ├── VariableDeclarationStatement.cs
│ │ │ │ ├── WhileStatement.cs
│ │ │ │ ├── YieldBreakStatement.cs
│ │ │ │ └── YieldReturnStatement.cs
│ │ │ ├── SyntaxExtensions.cs
│ │ │ ├── SyntaxTree.cs
│ │ │ ├── TokenRole.cs
│ │ │ └── TypeMembers/
│ │ │ ├── Accessor.cs
│ │ │ ├── ConstructorDeclaration.cs
│ │ │ ├── DestructorDeclaration.cs
│ │ │ ├── EntityDeclaration.cs
│ │ │ ├── EnumMemberDeclaration.cs
│ │ │ ├── EventDeclaration.cs
│ │ │ ├── FieldDeclaration.cs
│ │ │ ├── FixedFieldDeclaration.cs
│ │ │ ├── FixedVariableInitializer.cs
│ │ │ ├── IndexerDeclaration.cs
│ │ │ ├── MethodDeclaration.cs
│ │ │ ├── OperatorDeclaration.cs
│ │ │ ├── ParameterDeclaration.cs
│ │ │ ├── PropertyDeclaration.cs
│ │ │ └── VariableInitializer.cs
│ │ ├── CSharpProjectContent.cs
│ │ ├── CombineQueryExpressions.cs
│ │ ├── Completion/
│ │ │ ├── CSharpCompletionEngine.cs
│ │ │ ├── CSharpCompletionEngineBase.cs
│ │ │ ├── CSharpParameterCompletionEngine.cs
│ │ │ ├── CompletionDataWrapper.cs
│ │ │ ├── ICompletionContextProvider.cs
│ │ │ ├── ICompletionDataFactory.cs
│ │ │ └── IParameterCompletionDataFactory.cs
│ │ ├── Formatter/
│ │ │ ├── CSharpFormatter.cs
│ │ │ ├── CSharpFormattingOptions.cs
│ │ │ ├── ConstructFixer.cs
│ │ │ ├── FormattingChanges.cs
│ │ │ ├── FormattingOptionsFactory.cs
│ │ │ ├── FormattingVisitor.cs
│ │ │ ├── FormattingVisitor_Expressions.cs
│ │ │ ├── FormattingVisitor_Global.cs
│ │ │ ├── FormattingVisitor_Query.cs
│ │ │ ├── FormattingVisitor_Statements.cs
│ │ │ ├── FormattingVisitor_TypeMembers.cs
│ │ │ ├── GeneratedCodeSettings.cs
│ │ │ ├── Indent.cs
│ │ │ └── TextEditorOptions.cs
│ │ ├── ICSharpCode.NRefactory.CSharp.csproj
│ │ ├── IndentEngine/
│ │ │ ├── CSharpIndentEngine.cs
│ │ │ ├── CacheIndentEngine.cs
│ │ │ ├── IDocumentIndentEngine.cs
│ │ │ ├── IStateMachineIndentEngine.cs
│ │ │ ├── IndentState.cs
│ │ │ ├── NullIStateMachineIndentEngine.cs
│ │ │ └── TextPasteIndentEngine.cs
│ │ ├── IntroduceQueryExpressions.cs
│ │ ├── NameLookupMode.cs
│ │ ├── OutputVisitor/
│ │ │ ├── CSharpAmbience.cs
│ │ │ ├── CSharpOutputVisitor.cs
│ │ │ ├── CodeDomConvertVisitor.cs
│ │ │ ├── ITokenWriter.cs
│ │ │ ├── InsertMissingTokensDecorator.cs
│ │ │ ├── InsertParenthesesVisitor.cs
│ │ │ ├── InsertRequiredSpacesDecorator.cs
│ │ │ ├── InsertSpecialsDecorator.cs
│ │ │ └── TextWriterOutputFormatter.cs
│ │ ├── Parser/
│ │ │ ├── CSharpParser.cs
│ │ │ ├── CompilerSettings.cs
│ │ │ ├── SeekableStreamReader.cs
│ │ │ └── mcs/
│ │ │ ├── CryptoConvert.cs
│ │ │ ├── MonoSymbolFile.cs
│ │ │ ├── MonoSymbolTable.cs
│ │ │ ├── MonoSymbolWriter.cs
│ │ │ ├── SourceMethodBuilder.cs
│ │ │ ├── anonymous.cs
│ │ │ ├── argument.cs
│ │ │ ├── assembly.cs
│ │ │ ├── assign.cs
│ │ │ ├── async.cs
│ │ │ ├── attribute.cs
│ │ │ ├── cfold.cs
│ │ │ ├── class.cs
│ │ │ ├── codegen.cs
│ │ │ ├── complete.cs
│ │ │ ├── const.cs
│ │ │ ├── constant.cs
│ │ │ ├── context.cs
│ │ │ ├── convert.cs
│ │ │ ├── cs-parser.cs
│ │ │ ├── cs-parser.jay
│ │ │ ├── cs-tokenizer.cs
│ │ │ ├── decl.cs
│ │ │ ├── delegate.cs
│ │ │ ├── doc.cs
│ │ │ ├── driver.cs
│ │ │ ├── dynamic.cs
│ │ │ ├── ecore.cs
│ │ │ ├── enum.cs
│ │ │ ├── eval.cs
│ │ │ ├── expression.cs
│ │ │ ├── field.cs
│ │ │ ├── flowanalysis.cs
│ │ │ ├── generic.cs
│ │ │ ├── import.cs
│ │ │ ├── iterators.cs
│ │ │ ├── lambda.cs
│ │ │ ├── linq.cs
│ │ │ ├── literal.cs
│ │ │ ├── location.cs
│ │ │ ├── membercache.cs
│ │ │ ├── method.cs
│ │ │ ├── modifiers.cs
│ │ │ ├── module.cs
│ │ │ ├── namespace.cs
│ │ │ ├── nullable.cs
│ │ │ ├── outline.cs
│ │ │ ├── parameter.cs
│ │ │ ├── pending.cs
│ │ │ ├── property.cs
│ │ │ ├── reflection.cs
│ │ │ ├── report.cs
│ │ │ ├── settings.cs
│ │ │ ├── statement.cs
│ │ │ ├── support.cs
│ │ │ ├── symbolwriter.cs
│ │ │ ├── typemanager.cs
│ │ │ ├── typespec.cs
│ │ │ └── visit.cs
│ │ ├── PatternMatching/
│ │ │ └── AnyType.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── QueryExpressionExpander.cs
│ │ ├── Refactoring/
│ │ │ ├── BaseRefactoringContext.cs
│ │ │ ├── CodeAction.cs
│ │ │ ├── CodeActionProvider.cs
│ │ │ ├── CodeActions/
│ │ │ │ └── RemoveFieldRefactoryActionRefactoringAction.cs
│ │ │ ├── CodeGenerationService.cs
│ │ │ ├── CodeIssue.cs
│ │ │ ├── CodeIssueProvider.cs
│ │ │ ├── CommonSubIssues.cs
│ │ │ ├── ContextActionAttribute.cs
│ │ │ ├── DocumentScript.cs
│ │ │ ├── FormatStringHelper.cs
│ │ │ ├── IssueAttribute.cs
│ │ │ ├── LambdaHelper.cs
│ │ │ ├── LocalReferenceFinder.cs
│ │ │ ├── NamingHelper.cs
│ │ │ ├── PatternHelper.cs
│ │ │ ├── RefactoringAstHelper.cs
│ │ │ ├── RefactoringContext.cs
│ │ │ ├── Script.cs
│ │ │ ├── TypeGuessing.cs
│ │ │ ├── TypeSystemAstBuilder.cs
│ │ │ ├── UsingHelper.cs
│ │ │ ├── VariableReferenceGraph.cs
│ │ │ └── WordParser.cs
│ │ ├── Resolver/
│ │ │ ├── AliasNamespaceResolveResult.cs
│ │ │ ├── AliasTypeResolveResult.cs
│ │ │ ├── AwaitResolveResult.cs
│ │ │ ├── CSharpAstResolver.cs
│ │ │ ├── CSharpConversions.cs
│ │ │ ├── CSharpInvocationResolveResult.cs
│ │ │ ├── CSharpOperators.cs
│ │ │ ├── CSharpResolver.cs
│ │ │ ├── CastResolveResult.cs
│ │ │ ├── CompositeResolveVisitorNavigator.cs
│ │ │ ├── DetectSkippableNodesNavigator.cs
│ │ │ ├── DynamicInvocationResolveResult.cs
│ │ │ ├── DynamicMemberResolveResult.cs
│ │ │ ├── FindReferenceSearchScope.cs
│ │ │ ├── FindReferencedEntities.cs
│ │ │ ├── FindReferences.cs
│ │ │ ├── IResolveVisitorNavigator.cs
│ │ │ ├── LambdaResolveResult.cs
│ │ │ ├── Log.cs
│ │ │ ├── MemberLookup.cs
│ │ │ ├── MethodGroupResolveResult.cs
│ │ │ ├── NodeListResolveVisitorNavigator.cs
│ │ │ ├── OverloadResolution.cs
│ │ │ ├── OverloadResolutionErrors.cs
│ │ │ ├── ReducedExtensionMethod.cs
│ │ │ ├── RenameCallbackArguments.cs
│ │ │ ├── ResolveAtLocation.cs
│ │ │ ├── ResolveVisitor.cs
│ │ │ └── TypeInference.cs
│ │ ├── TypeSystem/
│ │ │ ├── AliasNamespaceReference.cs
│ │ │ ├── AttributeTypeReference.cs
│ │ │ ├── CSharpAssembly.cs
│ │ │ ├── CSharpAttribute.cs
│ │ │ ├── CSharpDocumentationComment.cs
│ │ │ ├── CSharpTypeResolveContext.cs
│ │ │ ├── CSharpUnresolvedFile.cs
│ │ │ ├── CSharpUnresolvedTypeDefinition.cs
│ │ │ ├── ConstantValues.cs
│ │ │ ├── MemberTypeOrNamespaceReference.cs
│ │ │ ├── MethodTypeParameterWithInheritedConstraints.cs
│ │ │ ├── ResolvedUsingScope.cs
│ │ │ ├── SimpleTypeOrNamespaceReference.cs
│ │ │ ├── TypeOrNamespaceReference.cs
│ │ │ ├── TypeSystemConvertVisitor.cs
│ │ │ └── UsingScope.cs
│ │ └── Util/
│ │ └── CloneableStack.cs
│ ├── ICSharpCode.NRefactory.CSharp.AstVerifier/
│ │ ├── AssemblyInfo.cs
│ │ ├── ICSharpCode.NRefactory.CSharp.AstVerifier.csproj
│ │ └── Main.cs
│ ├── ICSharpCode.NRefactory.CSharp.Refactoring/
│ │ ├── CodeActions/
│ │ │ ├── AbstractAndVirtualConversionAction.cs
│ │ │ ├── AddAnotherAccessorAction.cs
│ │ │ ├── AddArgumentNameAction.cs
│ │ │ ├── AddBracesAction.cs
│ │ │ ├── AddCatchTypeAction.cs
│ │ │ ├── AddExceptionDescriptionAction.cs
│ │ │ ├── AddOptionalParameterToInvocationAction.cs
│ │ │ ├── AddUsingAction.cs
│ │ │ ├── AutoLinqSumAction.cs
│ │ │ ├── CS1105ExtensionMethodMustBeDeclaredStaticAction.cs
│ │ │ ├── CS1520MethodMustHaveAReturnTypeAction.cs
│ │ │ ├── ChangeAccessModifierAction.cs
│ │ │ ├── CheckIfParameterIsNullAction.cs
│ │ │ ├── ComputeConstantValueAction.cs
│ │ │ ├── ConvertAnonymousDelegateToLambdaAction.cs
│ │ │ ├── ConvertAsToCastAction.cs
│ │ │ ├── ConvertAssignmentToIfAction.cs
│ │ │ ├── ConvertBitwiseFlagComparisonToHasFlagsAction.cs
│ │ │ ├── ConvertCastToAsAction.cs
│ │ │ ├── ConvertDecToHexAction.cs
│ │ │ ├── ConvertDoWhileToWhileLoopAction.cs
│ │ │ ├── ConvertEqualityOperatorToEqualsAction.cs
│ │ │ ├── ConvertEqualsToEqualityOperatorAction.cs
│ │ │ ├── ConvertExplicitToImplicitImplementationAction.cs
│ │ │ ├── ConvertForToWhileAction.cs
│ │ │ ├── ConvertForeachToForAction.cs
│ │ │ ├── ConvertHasFlagsToBitwiseFlagComparisonAction.cs
│ │ │ ├── ConvertHexToDecAction.cs
│ │ │ ├── ConvertIfStatementToConditionalTernaryExpressionAction.cs
│ │ │ ├── ConvertIfStatementToNullCoalescingExpressionAction.cs
│ │ │ ├── ConvertIfStatementToReturnStatementAction.cs
│ │ │ ├── ConvertIfStatementToSwitchStatementAction.cs
│ │ │ ├── ConvertImplicitToExplicitImplementationAction.cs
│ │ │ ├── ConvertLambdaBodyExpressionToStatementAction.cs
│ │ │ ├── ConvertLambdaBodyStatementToExpressionAction.cs
│ │ │ ├── ConvertLambdaToAnonymousDelegateAction.cs
│ │ │ ├── ConvertMethodGroupToAnonymousMethodAction.cs
│ │ │ ├── ConvertMethodGroupToLambdaAction.cs
│ │ │ ├── ConvertMultiplyToShiftAction.cs
│ │ │ ├── ConvertNullCoalescingToConditionalExpressionAction.cs
│ │ │ ├── ConvertReturnStatementToIfAction.cs
│ │ │ ├── ConvertShiftToMultiplyAction.cs
│ │ │ ├── ConvertSwitchToIfAction.cs
│ │ │ ├── ConvertToInitializer/
│ │ │ │ ├── AccessPath.cs
│ │ │ │ ├── ConvertInitializerToExplicitInitializationsAction.cs
│ │ │ │ ├── ConvertToInitializerAction.cs
│ │ │ │ └── StatementsToInitializerConverter.cs
│ │ │ ├── ConvertWhileToDoWhileLoopAction.cs
│ │ │ ├── CopyCommentsFromBase.cs
│ │ │ ├── CopyCommentsFromInterface.cs
│ │ │ ├── CreateBackingStoreAction.cs
│ │ │ ├── CreateChangedEventAction.cs
│ │ │ ├── CreateClassDeclarationAction.cs
│ │ │ ├── CreateConstructorDeclarationAction.cs
│ │ │ ├── CreateCustomEventImplementationAction.cs
│ │ │ ├── CreateDelegateAction.cs
│ │ │ ├── CreateEnumValue.cs
│ │ │ ├── CreateEventInvocatorAction.cs
│ │ │ ├── CreateFieldAction.cs
│ │ │ ├── CreateIndexerAction.cs
│ │ │ ├── CreateLocalVariableAction.cs
│ │ │ ├── CreateMethodDeclarationAction.cs
│ │ │ ├── CreateOverloadWithoutParameterAction.cs
│ │ │ ├── CreatePropertyAction.cs
│ │ │ ├── DeclareLocalVariableAction.cs
│ │ │ ├── ExtensionMethodInvocationToStaticMethodInvocationAction.cs
│ │ │ ├── ExtractAnonymousMethodAction.cs
│ │ │ ├── ExtractFieldAction.cs
│ │ │ ├── ExtractMethod/
│ │ │ │ ├── ExtractMethodAction.cs
│ │ │ │ ├── StaticVisitor.cs
│ │ │ │ ├── VariableLookupVisitor.cs
│ │ │ │ └── VariableUsageAnalyzation.cs
│ │ │ ├── ExtractWhileConditionToInternalIfStatementAction.cs
│ │ │ ├── FlipEqualsTargetAndArgumentAction.cs
│ │ │ ├── FlipOperatorArgumentsAction.cs
│ │ │ ├── GenerateGetterAction.cs
│ │ │ ├── GeneratePropertyAction.cs
│ │ │ ├── GenerateSwitchLabelsAction.cs
│ │ │ ├── ImplementAbstractMembersAction.cs
│ │ │ ├── ImplementInterfaceAction.cs
│ │ │ ├── ImplementInterfaceExplicitAction.cs
│ │ │ ├── ImplementNotImplementedProperty.cs
│ │ │ ├── InlineLocalVariableAction.cs
│ │ │ ├── InsertAnonymousMethodSignatureAction.cs
│ │ │ ├── IntroduceConstantAction.cs
│ │ │ ├── IntroduceFormatItemAction.cs
│ │ │ ├── InvertConditionalOperatorAction.cs
│ │ │ ├── InvertIfAction.cs
│ │ │ ├── InvertIfAndSimplify.cs
│ │ │ ├── InvertLogicalExpressionAction.cs
│ │ │ ├── IterateViaForeachAction.cs
│ │ │ ├── JoinDeclarationAndAssignmentAction.cs
│ │ │ ├── JoinStringAction.cs
│ │ │ ├── LinqFluentToQueryAction.cs
│ │ │ ├── LinqQueryToFluentAction.cs
│ │ │ ├── MergeNestedIfAction.cs
│ │ │ ├── MoveToOuterScopeAction.cs
│ │ │ ├── NegateIsExpressionAction.cs
│ │ │ ├── NegateRelationalExpressionAction.cs
│ │ │ ├── PutInsideUsingAction.cs
│ │ │ ├── RemoveBackingStoreAction.cs
│ │ │ ├── RemoveBracesAction.cs
│ │ │ ├── RemoveRedundantCatchTypeAction.cs
│ │ │ ├── RemoveRegionAction.cs
│ │ │ ├── ReplaceAssignmentWithPostfixExpressionAction.cs
│ │ │ ├── ReplaceEmptyStringAction.cs
│ │ │ ├── ReplaceOperatorAssignmentWithAssignmentAction.cs
│ │ │ ├── ReplacePostfixExpressionWithAssignmentAction.cs
│ │ │ ├── ReplaceWithOperatorAssignmentAction.cs
│ │ │ ├── ReverseDirectionForForLoopAction.cs
│ │ │ ├── SimplifyIfFlowAction.cs
│ │ │ ├── SimplifyIfInLoopsFlowAction.cs
│ │ │ ├── SortUsingsAction.cs
│ │ │ ├── SpecializedCodeAction.cs
│ │ │ ├── SplitDeclarationAndAssignmentAction.cs
│ │ │ ├── SplitDeclarationListAction.cs
│ │ │ ├── SplitIfAction.cs
│ │ │ ├── SplitStringAction.cs
│ │ │ ├── UseAsAndNullCheckAction.cs
│ │ │ ├── UseExplicitTypeAction.cs
│ │ │ ├── UseStringFormatAction.cs
│ │ │ └── UseVarKeywordAction.cs
│ │ ├── CodeIssues/
│ │ │ ├── Custom/
│ │ │ │ ├── AdditionalOfTypeIssues.cs
│ │ │ │ ├── BaseMethodParameterNameMismatchIssue.cs
│ │ │ │ ├── CallToObjectEqualsViaBaseIssue.cs
│ │ │ │ ├── CastExpressionOfIncompatibleTypeIssue.cs
│ │ │ │ ├── CheckNamespaceIssue.cs
│ │ │ │ ├── CompilerErrors/
│ │ │ │ │ ├── CS0029InvalidConversionIssue.cs
│ │ │ │ │ ├── CS0126ReturnMustBeFollowedByAnyExpression.cs
│ │ │ │ │ ├── CS0127ReturnMustNotBeFollowedByAnyExpression.cs
│ │ │ │ │ ├── CS0152DuplicateCaseLabelValueIssue.cs
│ │ │ │ │ ├── CS0169FieldIsNeverUsedIssue.cs
│ │ │ │ │ ├── CS0618UsageOfObsoleteMemberIssue.cs
│ │ │ │ │ ├── CS0659OverrideEqualWithoutGetHashCode.cs
│ │ │ │ │ ├── CS0759RedundantPartialMethodIssue.cs
│ │ │ │ │ ├── CS1729TypeHasNoConstructorWithNArgumentsIssue.cs
│ │ │ │ │ ├── ExpressionIsNeverOfProvidedTypeIssue.cs
│ │ │ │ │ ├── MissingInterfaceMemberImplementationIssue.cs
│ │ │ │ │ └── StaticConstructorParameterIssue.cs
│ │ │ │ ├── ConstantConditionIssue.cs
│ │ │ │ ├── ConvertIfToAndExpressionIssue.cs
│ │ │ │ ├── LockThisIssue.cs
│ │ │ │ ├── MixedUseOfFieldsAndGettersIssue.cs
│ │ │ │ ├── NegativeRelationalExpressionIssue.cs
│ │ │ │ ├── NotImplementedExceptionIssue.cs
│ │ │ │ ├── ParameterOnlyAssignedIssue.cs
│ │ │ │ ├── RedundantAssignmentIssue.cs
│ │ │ │ ├── RedundantInternalIssue.cs
│ │ │ │ ├── RedundantPrivateIssue.cs
│ │ │ │ ├── StaticEventSubscriptionIssue.cs
│ │ │ │ ├── UnreachableCodeIssue.cs
│ │ │ │ ├── VariableOnlyAssignedIssue.cs
│ │ │ │ └── XmlDocIssue.cs
│ │ │ ├── GatherVisitorBase.cs
│ │ │ ├── IssueCategories.cs
│ │ │ ├── NotWorking/
│ │ │ │ ├── AccessToClosureIssues/
│ │ │ │ │ ├── AccessToClosureIssue.cs
│ │ │ │ │ ├── AccessToDisposedClosureIssue.cs
│ │ │ │ │ ├── AccessToModifiedClosureIssue.cs
│ │ │ │ │ └── LocalVariableNamePicker.cs
│ │ │ │ ├── DuplicateBodyMethodIssue.cs
│ │ │ │ ├── DuplicateExpressionsInConditionsIssue.cs
│ │ │ │ ├── DuplicateIfInIfChainIssue.cs
│ │ │ │ ├── ParameterCanBeIEnumerableIssue.cs
│ │ │ │ └── VariableDeclaredInWideScopeIssue.cs
│ │ │ ├── RefactoringExtensions.cs
│ │ │ ├── Synced/
│ │ │ │ ├── CodeQuality/
│ │ │ │ │ ├── BaseMethodCallWithDefaultParameterIssue.cs
│ │ │ │ │ ├── BitwiseOperatorOnEnumWithoutFlagsIssue.cs
│ │ │ │ │ ├── CanBeReplacedWithTryCastAndCheckForNullIssue.cs
│ │ │ │ │ ├── CompareNonConstrainedGenericWithNullIssue.cs
│ │ │ │ │ ├── CompareOfFloatsByEqualityOperatorIssue.cs
│ │ │ │ │ ├── ConditionalTernaryEqualBranchIssue.cs
│ │ │ │ │ ├── DelegateSubtractionIssue.cs
│ │ │ │ │ ├── DoNotCallOverridableMethodsInConstructorIssue.cs
│ │ │ │ │ ├── EmptyGeneralCatchClauseIssue.cs
│ │ │ │ │ ├── EqualExpressionComparisonIssue.cs
│ │ │ │ │ ├── EventUnsubscriptionViaAnonymousDelegateIssue.cs
│ │ │ │ │ ├── ForControlVariableIsNeverModifiedIssue.cs
│ │ │ │ │ ├── FormatStringProblemIssue.cs
│ │ │ │ │ ├── FunctionNeverReturnsIssue.cs
│ │ │ │ │ ├── LocalVariableHidesMemberIssue.cs
│ │ │ │ │ ├── LongLiteralEndingLowerLIssue.cs
│ │ │ │ │ ├── MemberHidesStaticFromOuterClassIssue.cs
│ │ │ │ │ ├── MethodOverloadWithOptionalParameterIssue.cs
│ │ │ │ │ ├── NonReadonlyReferencedInGetHashCodeIssue.cs
│ │ │ │ │ ├── NotResolvedInTextIssue.cs
│ │ │ │ │ ├── ObjectCreationAsStatementIssue.cs
│ │ │ │ │ ├── OperatorIsCanBeUsedIssue.cs
│ │ │ │ │ ├── OptionalParameterHierarchyMismatchIssue.cs
│ │ │ │ │ ├── OptionalParameterRefOutIssue.cs
│ │ │ │ │ ├── ParameterHidesMemberIssue.cs
│ │ │ │ │ ├── PartialMethodParameterNameMismatchIssue.cs
│ │ │ │ │ ├── PolymorphicFieldLikeEventInvocationIssue.cs
│ │ │ │ │ ├── PossibleAssignmentToReadonlyFieldIssue.cs
│ │ │ │ │ ├── PossibleMultipleEnumerationIssue.cs
│ │ │ │ │ ├── StaticFieldInGenericTypeIssue.cs
│ │ │ │ │ ├── ThreadStaticAtInstanceFieldIssue.cs
│ │ │ │ │ └── ValueParameterNotUsedIssue.cs
│ │ │ │ ├── CompilerErrors/
│ │ │ │ │ └── ProhibitedModifiersIssue.cs
│ │ │ │ ├── CompilerWarnings/
│ │ │ │ │ ├── CS0183ExpressionIsAlwaysOfProvidedTypeIssue.cs
│ │ │ │ │ ├── CS1573ParameterHasNoMatchingParamTagIssue.cs
│ │ │ │ │ ├── CS1717AssignmentMadeToSameVariableIssue.cs
│ │ │ │ │ └── UnassignedReadonlyFieldIssue.cs
│ │ │ │ ├── ConstraintViolations/
│ │ │ │ │ └── InconsistentNamingIssue/
│ │ │ │ │ ├── AffectedEntity.cs
│ │ │ │ │ ├── DefaultRules.cs
│ │ │ │ │ ├── InconsistentNamingIssue.cs
│ │ │ │ │ ├── NamingConventionService.cs
│ │ │ │ │ ├── NamingRule.cs
│ │ │ │ │ └── NamingStyle.cs
│ │ │ │ ├── NUnit/
│ │ │ │ │ └── NonPublicMethodWithTestAttributeIssue.cs
│ │ │ │ ├── Opportunities/
│ │ │ │ │ ├── ConvertClosureToMethodGroupIssue.cs
│ │ │ │ │ ├── ConvertConditionalTernaryToNullCoalescingIssue.cs
│ │ │ │ │ ├── ConvertIfStatementToConditionalTernaryExpressionIssue.cs
│ │ │ │ │ ├── ConvertIfStatementToNullCoalescingExpressionIssue.cs
│ │ │ │ │ ├── ConvertIfStatementToSwitchStatementIssue.cs
│ │ │ │ │ ├── ConvertNullableToShortFormIssue.cs
│ │ │ │ │ ├── ConvertToAutoPropertyIssue.cs
│ │ │ │ │ ├── ConvertToLambdaExpressionIssue.cs
│ │ │ │ │ ├── ConvertToStaticTypeIssue.cs
│ │ │ │ │ ├── ForCanBeConvertedToForeachIssue.cs
│ │ │ │ │ ├── InvokeAsExtensionMethodIssue.cs
│ │ │ │ │ ├── RewriteIfReturnToReturnIssue.cs
│ │ │ │ │ └── SuggestUseVarKeywordEvidentIssue.cs
│ │ │ │ ├── PracticesAndImprovements/
│ │ │ │ │ ├── AccessToStaticMemberViaDerivedTypeIssue.cs
│ │ │ │ │ ├── BaseMemberHasParamsIssue.cs
│ │ │ │ │ ├── ConvertIfDoToWhileIssue.cs
│ │ │ │ │ ├── ConvertIfToOrExpressionIssue.cs
│ │ │ │ │ ├── ConvertToConstantIssue.cs
│ │ │ │ │ ├── EmptyEmbeddedStatementIssue.cs
│ │ │ │ │ ├── FieldCanBeMadeReadOnlyIssue.cs
│ │ │ │ │ ├── MemberCanBeMadeStaticIssue.cs
│ │ │ │ │ ├── ParameterCanBeDeclaredWithBaseTypeIssue.cs
│ │ │ │ │ ├── PossibleMistakenCallToGetTypeIssue.cs
│ │ │ │ │ ├── PublicConstructorInAbstractClass.cs
│ │ │ │ │ ├── ReferenceEqualsWithValueTypeIssue.cs
│ │ │ │ │ ├── ReplaceWithFirstOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithLastOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeAny.cs
│ │ │ │ │ ├── ReplaceWithOfTypeCountIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeFirstIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeFirstOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeLastIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeLastOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeLongCountIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeSingleIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeSingleOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithOfTypeWhereIssue.cs
│ │ │ │ │ ├── ReplaceWithSimpleAssignmentIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToAnyIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToAverageIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToCountIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToFirstIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToFirstOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToLastIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToLastOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToLongCountIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToMaxIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToMinIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToSingleIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToSingleOrDefaultIssue.cs
│ │ │ │ │ ├── ReplaceWithSingleCallToSumIssue.cs
│ │ │ │ │ ├── ReplaceWithStringIsNullOrEmptyIssue.cs
│ │ │ │ │ ├── SimplifyConditionalTernaryExpressionIssue.cs
│ │ │ │ │ ├── SimplifyLinqExpressionIssue.cs
│ │ │ │ │ ├── StringCompareIsCultureSpecificIssue.cs
│ │ │ │ │ ├── StringCompareToIsCultureSpecificIssue.cs
│ │ │ │ │ ├── StringEndsWithIsCultureSpecificIssue.cs
│ │ │ │ │ ├── StringIndexOfIsCultureSpecificIssue.cs
│ │ │ │ │ ├── StringLastIndexOfIsCultureSpecificIssue.cs
│ │ │ │ │ ├── StringStartsWithIsCultureSpecificIssue.cs
│ │ │ │ │ ├── UseArrayCreationExpressionIssue.cs
│ │ │ │ │ ├── UseIsOperatorIssue.cs
│ │ │ │ │ ├── UseMethodAnyIssue.cs
│ │ │ │ │ └── UseMethodIsInstanceOfTypeIssue.cs
│ │ │ │ ├── RedundanciesInCode/
│ │ │ │ │ ├── ArrayCreationCanBeReplacedWithArrayInitializerIssue.cs
│ │ │ │ │ ├── ConditionIsAlwaysTrueOrFalseIssue.cs
│ │ │ │ │ ├── ConstantNullCoalescingConditionIssue.cs
│ │ │ │ │ ├── DoubleNegationOperatorIssue.cs
│ │ │ │ │ ├── EmptyStatementIssue.cs
│ │ │ │ │ ├── ForStatementConditionIsTrueIssue.cs
│ │ │ │ │ ├── RedundantAnonymousTypePropertyNameIssue.cs
│ │ │ │ │ ├── RedundantArgumentDefaultValueIssue.cs
│ │ │ │ │ ├── RedundantArgumentNameIssue.cs
│ │ │ │ │ ├── RedundantAttributeParenthesesIssue.cs
│ │ │ │ │ ├── RedundantBaseQualifierIssue.cs
│ │ │ │ │ ├── RedundantBoolCompareIssue.cs
│ │ │ │ │ ├── RedundantCaseLabelIssue.cs
│ │ │ │ │ ├── RedundantCastIssue.cs
│ │ │ │ │ ├── RedundantCatchClauseIssue.cs
│ │ │ │ │ ├── RedundantCheckBeforeAssignmentIssue.cs
│ │ │ │ │ ├── RedundantCommaInArrayInitializerIssue.cs
│ │ │ │ │ ├── RedundantComparisonWithNullIssue.cs
│ │ │ │ │ ├── RedundantDelegateCreationIssue.cs
│ │ │ │ │ ├── RedundantEmptyDefaultSwitchBranchIssue.cs
│ │ │ │ │ ├── RedundantEmptyFinallyBlockIssue.cs
│ │ │ │ │ ├── RedundantEmptyObjectCreationArgumentListssue.cs
│ │ │ │ │ ├── RedundantEnumerableCastCallIssue.cs
│ │ │ │ │ ├── RedundantExplicitArrayCreationIssue.cs
│ │ │ │ │ ├── RedundantExplicitArraySizeIssue.cs
│ │ │ │ │ ├── RedundantExplicitNullableCreationIssue.cs
│ │ │ │ │ ├── RedundantExtendsListEntryIssue.cs
│ │ │ │ │ ├── RedundantIfElseBlockIssue.cs
│ │ │ │ │ ├── RedundantLambdaParameterTypeIssue.cs
│ │ │ │ │ ├── RedundantLambdaSignatureParenthesesIssue.cs
│ │ │ │ │ ├── RedundantLogicalConditionalExpressionOperandIssue.cs
│ │ │ │ │ ├── RedundantNameQualifierIssue.cs
│ │ │ │ │ ├── RedundantObjectOrCollectionInitializerIssue.cs
│ │ │ │ │ ├── RedundantStringToCharArrayCallIssue.cs
│ │ │ │ │ ├── RedundantTernaryExpressionIssue.cs
│ │ │ │ │ ├── RedundantThisQualifierIssue.cs
│ │ │ │ │ ├── RedundantToStringCallForValueTypesIssue.cs
│ │ │ │ │ ├── RedundantToStringCallIssue.cs
│ │ │ │ │ ├── RedundantUnsafeContextIssue.cs
│ │ │ │ │ ├── RedundantUsingDirectiveIssue.cs
│ │ │ │ │ ├── RemoveRedundantOrStatementIssue.cs
│ │ │ │ │ └── UnusedAnonymousMethodSignatureIssue.cs
│ │ │ │ └── RedundanciesInDeclaration/
│ │ │ │ ├── EmptyConstructorIssue.cs
│ │ │ │ ├── EmptyDestructorIssue.cs
│ │ │ │ ├── EmptyNamespaceIssue.cs
│ │ │ │ ├── EnumUnderlyingTypeIsIntIssue.cs
│ │ │ │ ├── LocalVariableNotUsedIssue.cs
│ │ │ │ ├── PartialTypeWithSinglePartIssue.cs
│ │ │ │ ├── RedundantBaseConstructorCallIssue.cs
│ │ │ │ ├── RedundantDefaultFieldInitializerIssue.cs
│ │ │ │ ├── RedundantOverridenMemberIssue.cs
│ │ │ │ ├── RedundantParamsIssue.cs
│ │ │ │ ├── SealedMemberInSealedClassIssue.cs
│ │ │ │ ├── UnusedLabelIssue.cs
│ │ │ │ ├── UnusedParameterIssue.cs
│ │ │ │ └── UnusedTypeParameterIssue.cs
│ │ │ ├── TODO/
│ │ │ │ ├── ConvertTailRecursiveCallToLoopIssue.cs
│ │ │ │ ├── LoopCanBeConvertedToQueryIssue.cs
│ │ │ │ ├── PartOfBodyCanBeConvertedToQueryIssue.cs
│ │ │ │ └── RedundantTypeArgumentsOfMethodIssue.cs
│ │ │ └── Uncategorized/
│ │ │ ├── AutoAsyncIssue.cs
│ │ │ ├── DisposeMethodInNonIDisposableTypeIssue.cs
│ │ │ ├── DontUseLinqWhenItsVerboseAndInefficientIssue.cs
│ │ │ ├── DuplicatedLinqToListOrArrayIssue.cs
│ │ │ ├── ExceptionRethrowIssue.cs
│ │ │ ├── ExplicitConversionInForEachIssue.cs
│ │ │ ├── IncorrectCallToObjectGetHashCodeIssue.cs
│ │ │ ├── RedundantBlockInDifferentBranchesIssue.cs
│ │ │ ├── RedundantNotNullAttributeInNonNullableTypeIssue.cs
│ │ │ ├── ResultOfAsyncCallShouldNotBeIgnoredIssue.cs
│ │ │ ├── SameGuardConditionExpressionInIfelseBranchesIssue.cs
│ │ │ ├── UnmatchedSizeSpecificationInArrayCreationIssue.cs
│ │ │ └── UseOfMemberOfNullReference.cs
│ │ ├── ICSharpCode.NRefactory.CSharp.Refactoring.csproj
│ │ └── Properties/
│ │ └── AssemblyInfo.cs
│ ├── ICSharpCode.NRefactory.Cecil/
│ │ ├── CecilLoader.cs
│ │ ├── ICSharpCode.NRefactory.Cecil.csproj
│ │ └── Properties/
│ │ └── AssemblyInfo.cs
│ ├── ICSharpCode.NRefactory.ConsistencyCheck/
│ │ ├── CSharpFile.cs
│ │ ├── CSharpProject.cs
│ │ ├── FindReferencesConsistencyCheck.cs
│ │ ├── ICSharpCode.NRefactory.ConsistencyCheck.csproj
│ │ ├── PatternMatchingTest.cs
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── RandomizedOrderResolverTest.cs
│ │ ├── Readme.txt
│ │ ├── ResolverTest.cs
│ │ ├── RoundtripTest.cs
│ │ ├── Solution.cs
│ │ ├── TypeSystemTests.cs
│ │ ├── VisitorBenchmark.cs
│ │ ├── Xml/
│ │ │ ├── IncrementalXmlParserTests.cs
│ │ │ └── XmlReaderTest.cs
│ │ └── app.config
│ ├── ICSharpCode.NRefactory.Demo/
│ │ ├── CSDemo.Designer.cs
│ │ ├── CSDemo.cs
│ │ ├── CSDemo.resx
│ │ ├── ICSharpCode.NRefactory.Demo.csproj
│ │ ├── MainForm.Designer.cs
│ │ ├── MainForm.cs
│ │ ├── MainForm.resx
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── SemanticTreeDialog.Designer.cs
│ │ ├── SemanticTreeDialog.cs
│ │ ├── SemanticTreeDialog.resx
│ │ ├── VBAstView.Designer.cs
│ │ ├── VBAstView.cs
│ │ ├── VBAstView.resx
│ │ ├── VBDemo.Designer.cs
│ │ ├── VBDemo.cs
│ │ ├── VBDemo.resx
│ │ ├── VBEditDialog.Designer.cs
│ │ ├── VBEditDialog.cs
│ │ └── VBEditDialog.resx
│ ├── ICSharpCode.NRefactory.GtkDemo/
│ │ ├── AssemblyInfo.cs
│ │ ├── CSharpDemo.cs
│ │ ├── ICSharpCode.NRefactory.GtkDemo.csproj
│ │ ├── Main.cs
│ │ ├── MainWindow.cs
│ │ └── gtk-gui/
│ │ ├── ICSharpCode.NRefactory.GtkDemo.MainWindow.cs
│ │ ├── generated.cs
│ │ └── gui.stetic
│ ├── ICSharpCode.NRefactory.IKVM/
│ │ ├── ICSharpCode.NRefactory.IKVM.csproj
│ │ ├── IkvmLoader.cs
│ │ ├── IntConstantValue.cs
│ │ ├── NonFrozenInterningProvider.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── ShortConstantValue.cs
│ │ ├── StringConstantValue.cs
│ │ └── StructConstantValue.cs
│ ├── ICSharpCode.NRefactory.Tests/
│ │ ├── Analysis/
│ │ │ ├── AbiComparerTests.cs
│ │ │ └── SymbolCollectorTests.cs
│ │ ├── CSharp/
│ │ │ ├── Analysis/
│ │ │ │ ├── DeclarationSpace/
│ │ │ │ │ ├── LocalDeclarationSpaceTests.cs
│ │ │ │ │ └── LocalDeclarationSpaceVisitorTests.cs
│ │ │ │ ├── DefiniteAssignmentTests.cs
│ │ │ │ ├── NullValueAnalysisTests.cs
│ │ │ │ └── SemanticHighlightingTests.cs
│ │ │ ├── AstStructureTests.cs
│ │ │ ├── AstTests.cs
│ │ │ ├── CSharpAmbienceTests.cs
│ │ │ ├── CSharpOutputVisitorTests.cs
│ │ │ ├── CodeActions/
│ │ │ │ ├── AbstractAndVirtualConversionActionTests.cs
│ │ │ │ ├── AddAnotherAccessorTests.cs
│ │ │ │ ├── AddArgumentNameTests.cs
│ │ │ │ ├── AddBracesActionTests.cs
│ │ │ │ ├── AddCatchTypeTests.cs
│ │ │ │ ├── AddExceptionDescriptionActionTests.cs
│ │ │ │ ├── AddOptionalParameterToInvocationTests.cs
│ │ │ │ ├── AddUsing/
│ │ │ │ │ ├── AddUsingActionAlphabeticalTests.cs
│ │ │ │ │ ├── AddUsingActionInsideNamespaceTests.cs
│ │ │ │ │ ├── AddUsingActionTests.cs
│ │ │ │ │ └── AddUsingRunActionTests.cs
│ │ │ │ ├── AutoLinqSumTests.cs
│ │ │ │ ├── CS1105ExtensionMethodMustBeDeclaredStaticActionTests.cs
│ │ │ │ ├── CS1520MethodMustHaveAReturnTypeTests.cs
│ │ │ │ ├── ChangeAccessModifierTests.cs
│ │ │ │ ├── CheckIfParameterIsNullTests.cs
│ │ │ │ ├── ComputeConstantValueTests.cs
│ │ │ │ ├── ContextActionTestBase.cs
│ │ │ │ ├── ConvertAnonymousDelegateToLambdaTests.cs
│ │ │ │ ├── ConvertAsToCastTests.cs
│ │ │ │ ├── ConvertAssignmentToIfActionTests.cs
│ │ │ │ ├── ConvertBitwiseFlagComparisonToHasFlagsActionTests.cs
│ │ │ │ ├── ConvertCastToAsTests.cs
│ │ │ │ ├── ConvertDecToHexTests.cs
│ │ │ │ ├── ConvertDoWhileToWhileLoopTests.cs
│ │ │ │ ├── ConvertEqualityOperatorToEqualsActionTests.cs
│ │ │ │ ├── ConvertEqualsToEqualityOperatorActionTests.cs
│ │ │ │ ├── ConvertExplicitToImplicitImplementationTests.cs
│ │ │ │ ├── ConvertForToWhileActionTests.cs
│ │ │ │ ├── ConvertForeachToForTests.cs
│ │ │ │ ├── ConvertHasFlagsToBitwiseFlagComparisonActionTests.cs
│ │ │ │ ├── ConvertHexToDecTests.cs
│ │ │ │ ├── ConvertIfStatementToConditionalTernaryExpressionActionTests.cs
│ │ │ │ ├── ConvertIfStatementToNullCoalescingExpressionActionTests.cs
│ │ │ │ ├── ConvertIfStatementToReturnStatementActionTests.cs
│ │ │ │ ├── ConvertIfStatementToSwitchStatementActionTests.cs
│ │ │ │ ├── ConvertImplicitToExplicittImplementationTests.cs
│ │ │ │ ├── ConvertLambdaBodyExpressionToStatementTests.cs
│ │ │ │ ├── ConvertLambdaBodyStatementToExpressionTests.cs
│ │ │ │ ├── ConvertLamdaToAnonymousDelegateTests.cs
│ │ │ │ ├── ConvertMethodGroupToAnonymousMethodActionTests.cs
│ │ │ │ ├── ConvertMethodGroupToLambdaActionTests.cs
│ │ │ │ ├── ConvertMultiplyToShiftActionTests.cs
│ │ │ │ ├── ConvertNullCoalescingToConditionalExpressionActionTests.cs
│ │ │ │ ├── ConvertReturnStatementToIfActionTests.cs
│ │ │ │ ├── ConvertShiftToMultiplyActionTests.cs
│ │ │ │ ├── ConvertSwitchToIfTests.cs
│ │ │ │ ├── ConvertToInitializer/
│ │ │ │ │ ├── ConvertInitializerToExplicitIntializationsTests.cs
│ │ │ │ │ └── ConvertToInitializerTests.cs
│ │ │ │ ├── ConvertWhileToDoWhileLoopTests.cs
│ │ │ │ ├── CopyCommentsFromBaseTests.cs
│ │ │ │ ├── CopyCommentsFromIntefaceTests.cs
│ │ │ │ ├── CreateBackingStoreTests.cs
│ │ │ │ ├── CreateChangedEventTests.cs
│ │ │ │ ├── CreateClassDeclarationTests.cs
│ │ │ │ ├── CreateConstructorDeclarationTests.cs
│ │ │ │ ├── CreateCustomEventImplementationTests.cs
│ │ │ │ ├── CreateDelegateTests.cs
│ │ │ │ ├── CreateEnumValueTests.cs
│ │ │ │ ├── CreateEventInvocatorTests.cs
│ │ │ │ ├── CreateFieldTests.cs
│ │ │ │ ├── CreateIndexerTests.cs
│ │ │ │ ├── CreateLocalVariableTests.cs
│ │ │ │ ├── CreateMethodDeclarationTests.cs
│ │ │ │ ├── CreateOverloadWithoutParameterTests.cs
│ │ │ │ ├── CreatePropertyTests.cs
│ │ │ │ ├── DeclareLocalVariableTests.cs
│ │ │ │ ├── ExtensionMethodInvocationToStaticMethodInvocationTests.cs
│ │ │ │ ├── ExtractAnonymousMethodTests.cs
│ │ │ │ ├── ExtractFieldTests.cs
│ │ │ │ ├── ExtractMethodTests.cs
│ │ │ │ ├── ExtractWhileConditionToInternalIfStatementActionTests.cs
│ │ │ │ ├── FlipEqualsTargetAndArgumentActionTests.cs
│ │ │ │ ├── FlipOperatorArgumentsTests.cs
│ │ │ │ ├── GenerateGetterTests.cs
│ │ │ │ ├── GeneratePropertyTests.cs
│ │ │ │ ├── GenerateSwitchLabelsTests.cs
│ │ │ │ ├── ImplementAbstractMembersTest.cs
│ │ │ │ ├── ImplementInterfaceExplicitTests.cs
│ │ │ │ ├── ImplementInterfaceTests.cs
│ │ │ │ ├── ImplementNotImplementedPropertyTests.cs
│ │ │ │ ├── InlineLocalVariableTests.cs
│ │ │ │ ├── InsertAnonymousMethodSignatureTests.cs
│ │ │ │ ├── IntroduceConstantTests.cs
│ │ │ │ ├── IntroduceFormatItemTests.cs
│ │ │ │ ├── InvertConditionalOperatorActionTests.cs
│ │ │ │ ├── InvertIfAndSimplifyTests.cs
│ │ │ │ ├── InvertIfTests.cs
│ │ │ │ ├── InvertLogicalExpressionTests.cs
│ │ │ │ ├── IterateViaForeachTests.cs
│ │ │ │ ├── JoinDeclarationAndAssignmentTests.cs
│ │ │ │ ├── JoinStringTests.cs
│ │ │ │ ├── LinqFluentToQueryTests.cs
│ │ │ │ ├── LinqQueryToFluentTests.cs
│ │ │ │ ├── MergeNestedIfTests.cs
│ │ │ │ ├── MetaTests.cs
│ │ │ │ ├── MoveToOuterScopeTests.cs
│ │ │ │ ├── NegateIsExpressionActionTests.cs
│ │ │ │ ├── NegateRelationalExpressionTests.cs
│ │ │ │ ├── PutInsideUsingTests.cs
│ │ │ │ ├── RemoveBackingStoreTests.cs
│ │ │ │ ├── RemoveBracesTests.cs
│ │ │ │ ├── RemoveFieldRefactoryActionTests.cs
│ │ │ │ ├── RemoveRedundantCatchTypeTests.cs
│ │ │ │ ├── RemoveRegionTests.cs
│ │ │ │ ├── ReplaceAssignmentWithPostfixExpressionActionTests.cs
│ │ │ │ ├── ReplaceEmptyStringTests.cs
│ │ │ │ ├── ReplaceOperatorAssignmentWithAssignmentActionTests.cs
│ │ │ │ ├── ReplacePostfixExpressionWithAssignmentActionTests.cs
│ │ │ │ ├── ReplaceWithOperatorAssignmentActionTests.cs
│ │ │ │ ├── ReverseDirectionForForLoopTests.cs
│ │ │ │ ├── SimplifyIfFlowInLoopsTests.cs
│ │ │ │ ├── SimplifyIfFlowTests.cs
│ │ │ │ ├── SortUsingsTests.cs
│ │ │ │ ├── SplitDeclarationAndAssignmentTests.cs
│ │ │ │ ├── SplitDeclarationListTests.cs
│ │ │ │ ├── SplitIfActionTests.cs
│ │ │ │ ├── SplitStringTests.cs
│ │ │ │ ├── TestRefactoringContext.cs
│ │ │ │ ├── UseAsAndNullCheckActionTests.cs
│ │ │ │ ├── UseExplicitTypeTests.cs
│ │ │ │ ├── UseStringFormatTests.cs
│ │ │ │ └── UseVarKeywordTests.cs
│ │ │ ├── CodeCompletion/
│ │ │ │ ├── BrowsableAttributeTests.cs
│ │ │ │ ├── CodeCompletionAccessibleTests.cs
│ │ │ │ ├── CodeCompletionBugTests.cs
│ │ │ │ ├── CodeCompletionCSharp3Tests.cs
│ │ │ │ ├── CodeCompletionCSharpTests.cs
│ │ │ │ ├── CodeCompletionOperatorTests.cs
│ │ │ │ ├── CompletionDataList.cs
│ │ │ │ ├── DelegateContextTests.cs
│ │ │ │ ├── DocumentationContextTests.cs
│ │ │ │ ├── EnumContextTests.cs
│ │ │ │ ├── FormatItemTests.cs
│ │ │ │ ├── GetCurrentParameterIndexTests.cs
│ │ │ │ ├── ImportCompletionTests.cs
│ │ │ │ ├── KeywordTests.cs
│ │ │ │ ├── NameContextTests.cs
│ │ │ │ ├── ObjectInitializerTests.cs
│ │ │ │ ├── ParameterCompletionTests.cs
│ │ │ │ ├── PreProcessorTests.cs
│ │ │ │ ├── TestBase.cs
│ │ │ │ └── VariableDeclarationStatementTests.cs
│ │ │ ├── CodeDomConvertVisitorTests.cs
│ │ │ ├── CodeIssues/
│ │ │ │ ├── AccessToDisposedClosureTests.cs
│ │ │ │ ├── AccessToModifiedClosureTests.cs
│ │ │ │ ├── AccessToStaticMemberViaDerivedTypeIssueTests.cs
│ │ │ │ ├── AdditionalOfTypeIssuesTests.cs
│ │ │ │ ├── ArrayCreationCanBeReplacedWithArrayInitializerIssueTests.cs
│ │ │ │ ├── AutoAsyncTests.cs
│ │ │ │ ├── BaseMemberHasParamsIssueTests.cs
│ │ │ │ ├── BaseMethodCallWithDefaultParameterIssueTests.cs
│ │ │ │ ├── BaseMethodParameterNameMismatchIssueTests.cs
│ │ │ │ ├── BitwiseOperatorOnEnumWithoutFlagsIssueTests.cs
│ │ │ │ ├── CS0029InvalidConversionIssueTests.cs
│ │ │ │ ├── CS0126ReturnMustBeFollowedByAnyExpressionTestes.cs
│ │ │ │ ├── CS0127ReturnMustNotBeFollowedByAnyExpressionTests.cs
│ │ │ │ ├── CS0152DuplicateCaseLabelValueIssueTests.cs
│ │ │ │ ├── CS0169FieldIsNeverUsedIssueTests.cs
│ │ │ │ ├── CS0183ExpressionIsAlwaysOfProvidedTypeIssueTests.cs
│ │ │ │ ├── CS0618UsageOfObsoleteMemberIssueTests.cs
│ │ │ │ ├── CS0659OverrideEqualsWithoutGetHashCodeTests.cs
│ │ │ │ ├── CS0759RedundantPartialMethodIssueTests.cs
│ │ │ │ ├── CS1573ParameterHasNoMatchingParamTagIssueTests.cs
│ │ │ │ ├── CS1717AssignmentMadeToSameVariableIssueTests.cs
│ │ │ │ ├── CS1729TypeHasNoConstructorWithNArgumentsIssueTests.cs
│ │ │ │ ├── CallToObjectEqualsViaBaseTests.cs
│ │ │ │ ├── CanBeReplacedWithTryCastAndCheckForNullIssueTests.cs
│ │ │ │ ├── CastExpressionOfIncompatibleTypeIssueTests.cs
│ │ │ │ ├── CheckNamespaceIssueTests.cs
│ │ │ │ ├── CompareNonConstrainedGenericWithNullIssueTests.cs
│ │ │ │ ├── CompareOfFloatsByEqualityOperatorIssueTests.cs
│ │ │ │ ├── ConditionIsAlwaysTrueOrFalseIssueTests.cs
│ │ │ │ ├── ConditionalTernaryEqualBranchTests.cs
│ │ │ │ ├── ConstantConditionIssueTests.cs
│ │ │ │ ├── ConstantNullCoalescingConditionIssueTests.cs
│ │ │ │ ├── ConvertClosureToMethodGroupIssueTests.cs
│ │ │ │ ├── ConvertConditionalTernaryToNullCoalescingIssueTests.cs
│ │ │ │ ├── ConvertIfDoToWhileIssueTests.cs
│ │ │ │ ├── ConvertIfStatementToConditionalTernaryExpressionIssueTests.cs
│ │ │ │ ├── ConvertIfStatementToNullCoalescingExpressionIssueTests.cs
│ │ │ │ ├── ConvertIfStatementToSwitchStatementIssueTests.cs
│ │ │ │ ├── ConvertIfToAndExpressionIssueTests.cs
│ │ │ │ ├── ConvertIfToOrExpressionIssueTests.cs
│ │ │ │ ├── ConvertNullableToShortFormIssueTests.cs
│ │ │ │ ├── ConvertTailRecursiveCallToLoopIssueTests.cs
│ │ │ │ ├── ConvertToAutoPropertyIssueTests.cs
│ │ │ │ ├── ConvertToConstantIssueTests.cs
│ │ │ │ ├── ConvertToLambdaExpressionIssueTests.cs
│ │ │ │ ├── ConvertToStaticTypeTests.cs
│ │ │ │ ├── DelegateSubtractionIssueTests.cs
│ │ │ │ ├── DisposeMethodInNonIDisposableTypeTests.cs
│ │ │ │ ├── DoNotCallOverridableMethodsInConstructorIssueTests.cs
│ │ │ │ ├── DontUseLinqWhenItsVerboseAndInefficientTests.cs
│ │ │ │ ├── DoubleNegationOperatorIssueTests.cs
│ │ │ │ ├── DuplicateBodyMethodIssueTests.cs
│ │ │ │ ├── DuplicateExpressionsInConditionsIssueTests.cs
│ │ │ │ ├── DuplicateIfInIfChainIssueTests.cs
│ │ │ │ ├── DuplicatedLinqToListOrArrayTests.cs
│ │ │ │ ├── EmptyConstructorIssueTests.cs
│ │ │ │ ├── EmptyDestructorTests.cs
│ │ │ │ ├── EmptyEmbeddedStatementIssueTests.cs
│ │ │ │ ├── EmptyGeneralCatchClauseTests.cs
│ │ │ │ ├── EmptyNamespaceTests.cs
│ │ │ │ ├── EmptyStatementIssueTests.cs
│ │ │ │ ├── EnumUnderlyingTypeIsIntTests.cs
│ │ │ │ ├── EqualExpressionComparisonIssueTests.cs
│ │ │ │ ├── EventUnsubscriptionViaAnonymousDelegateIssueTests.cs
│ │ │ │ ├── ExceptionRethrowTests.cs
│ │ │ │ ├── ExplicitConversionInForEachIssueTests.cs
│ │ │ │ ├── ExpressionIsNeverOfProvidedTypeIssueTests.cs
│ │ │ │ ├── FieldCanBeMadeReadOnlyIssueTests.cs
│ │ │ │ ├── ForCanBeConvertedToForeachIssueTests.cs
│ │ │ │ ├── ForControlVariableIsNeverModifiedIssueTests.cs
│ │ │ │ ├── ForStatementConditionIsTrueTests.cs
│ │ │ │ ├── FormatStringProblemIssueTests.cs
│ │ │ │ ├── FunctionNeverReturnsIssueTests.cs
│ │ │ │ ├── InconsistentNamingTests.cs
│ │ │ │ ├── IncorrectCallToGetHashCodeTests.cs
│ │ │ │ ├── InspectionActionTestBase.cs
│ │ │ │ ├── InvokeAsExtensionMethodIssueTests.cs
│ │ │ │ ├── LocalVariableHidesMemberIssueTests.cs
│ │ │ │ ├── LocalVariableNotUsedIssueTests.cs
│ │ │ │ ├── LockThisTests.cs
│ │ │ │ ├── LongLiteralEndingLowerLIssueTests.cs
│ │ │ │ ├── LoopCanBeConvertedToQueryIssueTests.cs
│ │ │ │ ├── MemberCanBeMadeStaticIssueTests.cs
│ │ │ │ ├── MemberHidesStaticFromOuterClassIssueTests.cs
│ │ │ │ ├── MethodOverloadWithOptionalParameterIssueTests.cs
│ │ │ │ ├── MissingInterfaceMemberImplementationIssueTests.cs
│ │ │ │ ├── NegativeRelationalExpressionIssueTests.cs
│ │ │ │ ├── NonPublicMethodWithTestAttributeIssueTests.cs
│ │ │ │ ├── NonReadonlyReferencedInGetHashCodeTests.cs
│ │ │ │ ├── NonReadonlyReferencedInGetHashCodeTetsts.cs
│ │ │ │ ├── NotImplementedExceptionInspectorTests.cs
│ │ │ │ ├── NotResolvedInTextIssueTests.cs
│ │ │ │ ├── ObjectCreationAsStatementIssueTests.cs
│ │ │ │ ├── OperatorIsCanBeUsedIssueTests.cs
│ │ │ │ ├── OptionalParameterHierarchyMismatchIssueTests.cs
│ │ │ │ ├── OptionalParameterRefOutIssueTests.cs
│ │ │ │ ├── ParameterCanBeDemotedIssue/
│ │ │ │ │ ├── IsTypeCriterionTests.cs
│ │ │ │ │ ├── ParameterCanBeDeclaredWithBaseTypeIssueTests.cs
│ │ │ │ │ ├── ParameterCanBeIEnumerableTests.cs
│ │ │ │ │ └── SupportsIndexingCriterionTests.cs
│ │ │ │ ├── ParameterHidesMemberIssueTests.cs
│ │ │ │ ├── ParameterOnlyAssignedIssueTests.cs
│ │ │ │ ├── PartOfBodyCanBeConvertedToQueryIssueTests.cs
│ │ │ │ ├── PartialMethodParameterNameMismatchIssueTests.cs
│ │ │ │ ├── PartialTypeWithSinglePartIssueTests.cs
│ │ │ │ ├── PolymorphicFieldLikeEventInvocationIssueTests.cs
│ │ │ │ ├── PossibleAssignmentToReadonlyFieldIssueTests.cs
│ │ │ │ ├── PossibleMistakenCallToGetTypeIssueTests.cs
│ │ │ │ ├── PossibleMultipleEnumerationIssueTests.cs
│ │ │ │ ├── ProhibitedModifiersIssueTests.cs
│ │ │ │ ├── PublicConstructorInAbstractClassIssueTest.cs
│ │ │ │ ├── RedundantAnonymousTypePropertyNameIssueTests.cs
│ │ │ │ ├── RedundantArgumentDefaultValueIssueTests.cs
│ │ │ │ ├── RedundantArgumentNameTests.cs
│ │ │ │ ├── RedundantAssignmentIssueTests.cs
│ │ │ │ ├── RedundantAttributeParenthesesIssueTests.cs
│ │ │ │ ├── RedundantBaseConstructorIssueTests.cs
│ │ │ │ ├── RedundantBaseQualifierTests.cs
│ │ │ │ ├── RedundantBlockInDifferentBranchesTests.cs
│ │ │ │ ├── RedundantBoolCompareIssueTests.cs
│ │ │ │ ├── RedundantCaseLabelIssueTests.cs
│ │ │ │ ├── RedundantCastIssueTests.cs
│ │ │ │ ├── RedundantCatchClauseIssueTests.cs
│ │ │ │ ├── RedundantCheckBeforeAssignmentTests.cs
│ │ │ │ ├── RedundantCommaInArrayInitializerIssueTests.cs
│ │ │ │ ├── RedundantComparisonWithNullIssueTests.cs
│ │ │ │ ├── RedundantDefaultFieldInitializerIssueTests.cs
│ │ │ │ ├── RedundantDelegateCreationIssueTests.cs
│ │ │ │ ├── RedundantEmptyDefaultSwitchBranchIssueTests.cs
│ │ │ │ ├── RedundantEmptyFinallyBlockIssueTests.cs
│ │ │ │ ├── RedundantEnumerableCastCallIssueTests.cs
│ │ │ │ ├── RedundantExplicitArrayCreationIssueTests.cs
│ │ │ │ ├── RedundantExplicitArraySizeIssueTests.cs
│ │ │ │ ├── RedundantExplicitNullableCreationIssueTests.cs
│ │ │ │ ├── RedundantExtendsListEntryIssueTests.cs
│ │ │ │ ├── RedundantIfElseBlockIssueTests.cs
│ │ │ │ ├── RedundantInternalInspectorTests.cs
│ │ │ │ ├── RedundantLambdaParameterTypeTests.cs
│ │ │ │ ├── RedundantLambdaSignatureParenthesesIssueTests.cs
│ │ │ │ ├── RedundantLogicalConditionalExpressionOperandIssueTests.cs
│ │ │ │ ├── RedundantNameQualifierIssueTests.cs
│ │ │ │ ├── RedundantNotNullAttributeInNonNullableTypeTests.cs
│ │ │ │ ├── RedundantObjectCreationArgumentListIssueTests.cs
│ │ │ │ ├── RedundantObjectOrCollectionInitializerIssueTests.cs
│ │ │ │ ├── RedundantOverridenMemberTests.cs
│ │ │ │ ├── RedundantParamsIssueTests.cs
│ │ │ │ ├── RedundantPrivateInspectorTests.cs
│ │ │ │ ├── RedundantStringToCharArrayCallIssueTests.cs
│ │ │ │ ├── RedundantTernaryExpressionIssueTests.cs
│ │ │ │ ├── RedundantThisQualifierIssueTests.cs
│ │ │ │ ├── RedundantToStringCallForValueTypesIssue.cs
│ │ │ │ ├── RedundantToStringCallIssueTests.cs
│ │ │ │ ├── RedundantTypeArgumentsOfMethodIssueTests.cs
│ │ │ │ ├── RedundantUnsafeContextIssueTests.cs
│ │ │ │ ├── RedundantUsingDirectiveIssueTests.cs
│ │ │ │ ├── RedundantWhereWithPredicateIssueTests.cs
│ │ │ │ ├── ReferenceEqualsWithValueTypeIssueTests.cs
│ │ │ │ ├── RemoveRedundantOrStatementIssueTests.cs
│ │ │ │ ├── ReplaceWithFirstOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithLastOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeAnyIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeCountIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeFirstIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeFirstOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeLastIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeLastOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeLongCountIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeSingleIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeSingleOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithOfTypeWhereIssueTests.cs
│ │ │ │ ├── ReplaceWithSimpleAssignmentIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToAverageIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToCountIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToFirstIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToLastIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToLastOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToLongCountIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToMaxIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToMinIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToSingleIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs
│ │ │ │ ├── ReplaceWithSingleCallToSumIssueTests.cs
│ │ │ │ ├── ReplaceWithStringIsNullOrEmptyIssueTests.cs
│ │ │ │ ├── RewriteIfReturnToReturnIssueTests.cs
│ │ │ │ ├── SameGuardConditionExpressionInIfElseBranchesTests.cs
│ │ │ │ ├── SealedMemberInSealedClassIssueTests.cs
│ │ │ │ ├── SimplifyConditionalTernaryExpressionIssueTests.cs
│ │ │ │ ├── SimplifyLinqExpressionIssueTests.cs
│ │ │ │ ├── StaticConstructorParameterIssueTests.cs
│ │ │ │ ├── StaticEventSubscriptionIssueTests.cs
│ │ │ │ ├── StaticFieldInGenericTypeTests.cs
│ │ │ │ ├── StringCompareIsCultureSpecificIssueTests.cs
│ │ │ │ ├── StringCompareToIsCultureSpecificIssueTests.cs
│ │ │ │ ├── StringEndsWithIsCultureSpecificIssueTest.cs
│ │ │ │ ├── StringIndexOfIsCultureSpecificIssueTest.cs
│ │ │ │ ├── StringLastIndexOfIsCultureSpecificIssueTest.cs
│ │ │ │ ├── StringStartsWithIsCultureSpecificIssueTest.cs
│ │ │ │ ├── SuggestUseVarKeywordEvidentTests.cs
│ │ │ │ ├── ThreadStaticAtInstanceFieldTests.cs
│ │ │ │ ├── UnassignedReadonlyFieldIssueTests.cs
│ │ │ │ ├── UnmatchedSizeSpeicificationInArrayCreationTests.cs
│ │ │ │ ├── UnreachableCodeIssueTests.cs
│ │ │ │ ├── UnusedAnonymousMethodSignatureIssueTests.cs
│ │ │ │ ├── UnusedLabelIssueTests.cs
│ │ │ │ ├── UnusedParameterIssueTests.cs
│ │ │ │ ├── UnusedTypeParameterIssueTests.cs
│ │ │ │ ├── UseArrayCreationExpressionIssueTests.cs
│ │ │ │ ├── UseIsOperatorIssueTests.cs
│ │ │ │ ├── UseMethodAnyIssueTests.cs
│ │ │ │ ├── UseMethodIsInstanceOfTypeIssueTests.cs
│ │ │ │ ├── UseOfMemberOfNullReferenceTests.cs
│ │ │ │ ├── ValueParameterNotUsedIssueTests.cs
│ │ │ │ ├── VariableDeclaredInWideScopeTests.cs
│ │ │ │ └── XmlDocIssueIssueTests.cs
│ │ │ ├── DepthFirstVisitorTests.cs
│ │ │ ├── InsertMissingTokensDecoratorTests.cs
│ │ │ ├── InsertParenthesesVisitorTests.cs
│ │ │ ├── Inspector/
│ │ │ │ └── InconsistentNamingIssueTests.cs
│ │ │ ├── Parser/
│ │ │ │ ├── Bugs/
│ │ │ │ │ └── ParserBugTests.cs
│ │ │ │ ├── ConsistencyChecker.cs
│ │ │ │ ├── Expression/
│ │ │ │ │ ├── AnonymousMethodExpressionTests.cs
│ │ │ │ │ ├── AnonymousTypeCreateExpressionTests.cs
│ │ │ │ │ ├── ArrayCreateExpressionTests.cs
│ │ │ │ │ ├── AssignmentExpressionTests.cs
│ │ │ │ │ ├── BaseReferenceExpressionTests.cs
│ │ │ │ │ ├── BinaryOperatorExpressionTests.cs
│ │ │ │ │ ├── CastExpressionTests.cs
│ │ │ │ │ ├── CheckedExpressionTests.cs
│ │ │ │ │ ├── ConditionalExpressionTests.cs
│ │ │ │ │ ├── DefaultValueExpressionTests.cs
│ │ │ │ │ ├── IdentifierExpressionTests.cs
│ │ │ │ │ ├── IndexerExpressionTests.cs
│ │ │ │ │ ├── InvocationExpressionTests.cs
│ │ │ │ │ ├── IsExpressionTests.cs
│ │ │ │ │ ├── LambdaExpressionTests.cs
│ │ │ │ │ ├── MemberReferenceExpressionTests.cs
│ │ │ │ │ ├── ObjectCreateExpressionTests.cs
│ │ │ │ │ ├── ParenthesizedExpressionTests.cs
│ │ │ │ │ ├── PointerReferenceExpressionTests.cs
│ │ │ │ │ ├── PrimitiveExpressionTests.cs
│ │ │ │ │ ├── QueryExpressionTests.cs
│ │ │ │ │ ├── SizeOfExpressionTests.cs
│ │ │ │ │ ├── StackAllocExpressionTests.cs
│ │ │ │ │ ├── ThisReferenceExpressionTests.cs
│ │ │ │ │ ├── TypeOfExpressionTests.cs
│ │ │ │ │ ├── TypeReferenceExpressionTests.cs
│ │ │ │ │ ├── UnaryOperatorExpressionTests.cs
│ │ │ │ │ └── UndocumentedExpressionTests.cs
│ │ │ │ ├── GeneralScope/
│ │ │ │ │ ├── AttributeSectionTests.cs
│ │ │ │ │ ├── CommentTests.cs
│ │ │ │ │ ├── DelegateDeclarationTests.cs
│ │ │ │ │ ├── NamespaceDeclarationTests.cs
│ │ │ │ │ ├── PreprocessorDirectiveTests.cs
│ │ │ │ │ ├── TypeDeclarationTests.cs
│ │ │ │ │ └── UsingDeclarationTests.cs
│ │ │ │ ├── ParseSelfTests.cs
│ │ │ │ ├── ParseUtil.cs
│ │ │ │ ├── Statements/
│ │ │ │ │ ├── BlockStatementTests.cs
│ │ │ │ │ ├── CheckedStatementTests.cs
│ │ │ │ │ ├── EmptyStatementTests.cs
│ │ │ │ │ ├── ExpressionStatementTests.cs
│ │ │ │ │ ├── FixedStatementTests.cs
│ │ │ │ │ ├── ForStatementTests.cs
│ │ │ │ │ ├── GotoStatementTests.cs
│ │ │ │ │ ├── IfElseStatementTests.cs
│ │ │ │ │ ├── InvalidStatementsTests.cs
│ │ │ │ │ ├── LabelStatementTests.cs
│ │ │ │ │ ├── LockStatementTests.cs
│ │ │ │ │ ├── ReturnStatementTests.cs
│ │ │ │ │ ├── SwitchStatementTests.cs
│ │ │ │ │ ├── ThrowStatementTests.cs
│ │ │ │ │ ├── TryCatchStatementTests.cs
│ │ │ │ │ ├── UnsafeStatementTests.cs
│ │ │ │ │ ├── UsingStatementTests.cs
│ │ │ │ │ ├── VariableDeclarationStatementTests.cs
│ │ │ │ │ ├── WhileStatementTests.cs
│ │ │ │ │ └── YieldStatementTests.cs
│ │ │ │ ├── TypeMembers/
│ │ │ │ │ ├── ConstructorDeclarationTests.cs
│ │ │ │ │ ├── DestructorDeclarationTests.cs
│ │ │ │ │ ├── EventDeclarationTests.cs
│ │ │ │ │ ├── FieldDeclarationTests.cs
│ │ │ │ │ ├── IndexerDeclarationTests.cs
│ │ │ │ │ ├── MethodDeclarationTests.cs
│ │ │ │ │ ├── OperatorDeclarationTests.cs
│ │ │ │ │ └── PropertyDeclarationTests.cs
│ │ │ │ └── TypeSystemConvertVisitorTests.cs
│ │ │ ├── QueryExpressionExpanderTests.cs
│ │ │ ├── Refactoring/
│ │ │ │ ├── LambdaHelperTests.cs
│ │ │ │ ├── NamingHelperTests.cs
│ │ │ │ ├── RefactoringStructureTests.cs
│ │ │ │ ├── ScriptTests.cs
│ │ │ │ └── TypeSystemAstBuilderTests.cs
│ │ │ └── Resolver/
│ │ │ ├── AnonymousTypeTests.cs
│ │ │ ├── ArrayCreateTests.cs
│ │ │ ├── AttributeTests.cs
│ │ │ ├── BinaryOperatorTests.cs
│ │ │ ├── CastTests.cs
│ │ │ ├── ComTests.cs
│ │ │ ├── ConditionalOperatorTests.cs
│ │ │ ├── ConversionsTest.cs
│ │ │ ├── DynamicTests.cs
│ │ │ ├── ExplicitConversionsTest.cs
│ │ │ ├── ExtensionMethodTests.cs
│ │ │ ├── FindReferencesTest.cs
│ │ │ ├── InvocationTests.cs
│ │ │ ├── LambdaTests.cs
│ │ │ ├── LinqTests.cs
│ │ │ ├── LocalTypeInferenceTests.cs
│ │ │ ├── MemberLookupTests.cs
│ │ │ ├── MethodTests.cs
│ │ │ ├── NameLookupTests.cs
│ │ │ ├── ObjectCreationTests.cs
│ │ │ ├── OverloadResolutionTests.cs
│ │ │ ├── ResolveAtLocationTests.cs
│ │ │ ├── ResolverTestBase.cs
│ │ │ ├── SizeOfTests.cs
│ │ │ ├── TypeInferenceTests.cs
│ │ │ ├── UnaryOperatorTests.cs
│ │ │ └── UnsafeCodeTests.cs
│ │ ├── Documentation/
│ │ │ ├── CSharpCrefLookupTests.cs
│ │ │ ├── CSharpCrefParserTests.cs
│ │ │ ├── CSharpDocumentationTests.cs
│ │ │ └── IDStringTests.cs
│ │ ├── Editor/
│ │ │ └── ReadOnlyDocumentTests.cs
│ │ ├── FormattingTests/
│ │ │ ├── ConstructFixerTests.cs
│ │ │ ├── TestBlankLineFormatting.cs
│ │ │ ├── TestBraceStlye.cs
│ │ │ ├── TestExpressionFormatting.cs
│ │ │ ├── TestFormattingBugs.cs
│ │ │ ├── TestGlobalLevelFormatting.cs
│ │ │ ├── TestKeepReformattingRules.cs
│ │ │ ├── TestLinq.cs
│ │ │ ├── TestSpacingVisitor.cs
│ │ │ ├── TestStatementIndentation.cs
│ │ │ ├── TestTypeLevelIndentation.cs
│ │ │ ├── TestWrapping.cs
│ │ │ └── TextEditorTestAdapter.cs
│ │ ├── ICSharpCode.NRefactory.Tests.csproj
│ │ ├── IndentationTests/
│ │ │ ├── AlignmentTests.cs
│ │ │ ├── AllInOneTests.cs
│ │ │ ├── BlockTest.cs
│ │ │ ├── CommentTests.cs
│ │ │ ├── GeneralTests.cs
│ │ │ ├── Helper.cs
│ │ │ ├── PreProcessorTests.cs
│ │ │ ├── StringTests.cs
│ │ │ ├── TestFiles/
│ │ │ │ ├── CSharpParser.cs
│ │ │ │ ├── Comments.cs
│ │ │ │ ├── IndentEngine.cs
│ │ │ │ ├── IndentState.cs
│ │ │ │ ├── InheritStatements.cs
│ │ │ │ ├── PreProcessorDirectives.cs
│ │ │ │ ├── Simple.cs
│ │ │ │ ├── Strings.cs
│ │ │ │ ├── SwitchCase.cs
│ │ │ │ └── TextArea.cs
│ │ │ └── TextPasteIndentEngineTests.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── TypeSystem/
│ │ │ ├── BinaryLoaderTests.cs
│ │ │ ├── BlobLoaderTests.cs
│ │ │ ├── CecilLoaderTests.cs
│ │ │ ├── CyclicProjectDependency.cs
│ │ │ ├── GetAllBaseTypesTest.cs
│ │ │ ├── GetMembersTests.cs
│ │ │ ├── IkvmLoaderTests.cs
│ │ │ ├── InheritanceHelperTests.cs
│ │ │ ├── LazyLoadedCecilLoaderTests.cs
│ │ │ ├── ReflectionHelperTests.cs
│ │ │ ├── SerializedCecilLoaderTests.cs
│ │ │ ├── SerializedIkvmLoaderTests.cs
│ │ │ ├── StructureTests.cs
│ │ │ ├── TestInterningProvider.cs
│ │ │ ├── TypeParameterTests.cs
│ │ │ ├── TypeSystemHelper.cs
│ │ │ ├── TypeSystemTests.TestCase.cs
│ │ │ └── TypeSystemTests.cs
│ │ └── Utils/
│ │ ├── CSharpPrimitiveCastTests.cs
│ │ ├── CompositeFormatStringParser/
│ │ │ └── CompositeFormatStringParserTests.cs
│ │ └── TreeTraversalTests.cs
│ ├── ICSharpCode.NRefactory.Xml/
│ │ ├── AXmlAttribute.cs
│ │ ├── AXmlDocument.cs
│ │ ├── AXmlElement.cs
│ │ ├── AXmlObject.cs
│ │ ├── AXmlParser.cs
│ │ ├── AXmlReader.cs
│ │ ├── AXmlTag.cs
│ │ ├── AXmlText.cs
│ │ ├── AXmlVisitor.cs
│ │ ├── DocumentationElement.cs
│ │ ├── ICSharpCode.NRefactory.Xml.csproj
│ │ ├── IncrementalParserState.cs
│ │ ├── InternalDocument.cs
│ │ ├── Log.cs
│ │ ├── ObjectIterator.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── ReuseEqualityComparer.cs
│ │ ├── SyntaxError.cs
│ │ ├── TagMatchingHeuristics.cs
│ │ ├── TagReader.cs
│ │ ├── TextType.cs
│ │ ├── TokenReader.cs
│ │ └── XmlSegment.cs
│ ├── ICSharpCode.NRefactory.snk
│ ├── NRefactory.sln
│ ├── README
│ └── doc/
│ ├── Pattern Matching.html
│ ├── TODO
│ ├── XML Documentation.html
│ ├── copyright.txt
│ └── license.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CodeStyle.DotSettings
├── LICENSE.txt
├── Makefile
├── README.md
├── assets/
│ ├── Fuse.icns
│ ├── FuseBigSur.icns
│ ├── README.md
│ └── Unoproj.icns
├── components/
│ ├── android/
│ │ └── install.js
│ ├── sublime-plugin/
│ │ └── install.js
│ └── vscode-extension/
│ └── install.js
├── docs/
│ └── coding-style.md
├── empty/
│ ├── MainView.ux
│ └── app.unoproj
├── example/
│ ├── Logic.ts
│ ├── MainView.ux
│ └── app.unoproj
├── fuse-mac-dev.sln
├── fuse-mac.sln
├── fuse-win-dev.sln
├── fuse-win.sln
├── package.json
├── projects/
│ ├── BananApp/
│ │ ├── BananApp.unoproj
│ │ └── MainView.ux
│ ├── CheckForUpdates/
│ │ ├── App.config
│ │ ├── ConsoleApp1.csproj
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ └── releases.json
│ ├── JsErrors/
│ │ ├── .gitignore
│ │ ├── ConstructorThrower.uno
│ │ ├── JsErrors.unoproj
│ │ ├── Logger.uno
│ │ ├── MainView.ux
│ │ └── Thrower.uno
│ ├── SketchImportApp/
│ │ ├── Foo.sketch
│ │ ├── MainView.ux
│ │ └── SketchImportApp.unoproj
│ ├── SystemTest1/
│ │ ├── MainView.ux
│ │ └── SystemTest1.unoproj
│ ├── TextInput/
│ │ ├── MainView.ux
│ │ └── app.unoproj
│ └── models-manual-test/
│ ├── App.js
│ ├── MainView.ux
│ └── models-manual-test.unoproj
├── scripts/
│ ├── build.sh
│ ├── check-dependencies.js
│ ├── common.sh
│ ├── daemon.sh
│ ├── find-msbuild.ps1
│ ├── get-version.sh
│ ├── kill.sh
│ ├── postpack.sh
│ ├── prepack.sh
│ ├── restore.js
│ ├── system-test.sh
│ ├── test.sh
│ ├── texts-cs.js
│ ├── update-json.js
│ ├── ux-fuzzer.py
│ └── version.sh
├── setup/
│ ├── build.sh
│ ├── codesign-tgz.sh
│ ├── dmg/
│ │ ├── .gitignore
│ │ ├── build.sh
│ │ ├── dmg-background@2x.psd
│ │ ├── dmg.icns
│ │ ├── dmg.json
│ │ └── seticon
│ ├── entitlements.plist
│ ├── notarize.sh
│ ├── nsis/
│ │ ├── .gitignore
│ │ ├── copy-unoconfig.js
│ │ ├── data/
│ │ │ ├── license.txt
│ │ │ └── modern-xl-install.psd
│ │ ├── fuse-setup.nsi
│ │ ├── tools/
│ │ │ ├── COPYING
│ │ │ ├── Contrib/
│ │ │ │ ├── AccessControl/
│ │ │ │ │ ├── AccessControl.cpp
│ │ │ │ │ ├── AccessControl.rc
│ │ │ │ │ ├── AccessControl.sln
│ │ │ │ │ ├── AccessControl.vcxproj
│ │ │ │ │ ├── nsis_ansi/
│ │ │ │ │ │ ├── api.h
│ │ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ │ └── pluginapi.lib
│ │ │ │ │ ├── nsis_unicode/
│ │ │ │ │ │ ├── api.h
│ │ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ │ └── pluginapi.lib
│ │ │ │ │ └── resource.h
│ │ │ │ ├── ExecDos/
│ │ │ │ │ ├── ExecDos.sln
│ │ │ │ │ ├── ExecDos.vcxproj
│ │ │ │ │ ├── ExecDos.vcxproj.filters
│ │ │ │ │ ├── api.h
│ │ │ │ │ ├── consApp.cpp
│ │ │ │ │ ├── consApp.dsp
│ │ │ │ │ ├── execDos.c
│ │ │ │ │ ├── execDos.rc
│ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ ├── pluginapi.c
│ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ └── resource.h
│ │ │ │ ├── InstallOptionsEx/
│ │ │ │ │ ├── Controls/
│ │ │ │ │ │ ├── Button.h
│ │ │ │ │ │ ├── CheckBox.h
│ │ │ │ │ │ ├── ComboBox.h
│ │ │ │ │ │ ├── DateTime.h
│ │ │ │ │ │ ├── GroupBox.h
│ │ │ │ │ │ ├── Image.h
│ │ │ │ │ │ ├── IpAddress.h
│ │ │ │ │ │ ├── Label.h
│ │ │ │ │ │ ├── Link.h
│ │ │ │ │ │ ├── ListBox.h
│ │ │ │ │ │ ├── ListView.h
│ │ │ │ │ │ ├── MonthCalendar.h
│ │ │ │ │ │ ├── ProgressBar.h
│ │ │ │ │ │ ├── RadioButton.h
│ │ │ │ │ │ ├── RichText.h
│ │ │ │ │ │ ├── StatusBar.h
│ │ │ │ │ │ ├── Text.h
│ │ │ │ │ │ ├── ToolBar.h
│ │ │ │ │ │ ├── TrackBar.h
│ │ │ │ │ │ ├── TreeView.h
│ │ │ │ │ │ └── UpDown.h
│ │ │ │ │ ├── InstallerOptions.cpp
│ │ │ │ │ ├── InstallerOptions.h
│ │ │ │ │ ├── api.h
│ │ │ │ │ ├── io.sln
│ │ │ │ │ ├── io.vcproj
│ │ │ │ │ ├── ioptdll.rc
│ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ ├── pluginapi.c
│ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ └── resource.h
│ │ │ │ ├── Language files/
│ │ │ │ │ ├── Afrikaans.nlf
│ │ │ │ │ ├── Afrikaans.nsh
│ │ │ │ │ ├── Albanian.nlf
│ │ │ │ │ ├── Albanian.nsh
│ │ │ │ │ ├── Arabic.nlf
│ │ │ │ │ ├── Arabic.nsh
│ │ │ │ │ ├── Armenian.nlf
│ │ │ │ │ ├── Armenian.nsh
│ │ │ │ │ ├── Asturian.nlf
│ │ │ │ │ ├── Asturian.nsh
│ │ │ │ │ ├── Basque.nlf
│ │ │ │ │ ├── Basque.nsh
│ │ │ │ │ ├── Belarusian.nlf
│ │ │ │ │ ├── Belarusian.nsh
│ │ │ │ │ ├── Bosnian.nlf
│ │ │ │ │ ├── Bosnian.nsh
│ │ │ │ │ ├── Breton.nlf
│ │ │ │ │ ├── Breton.nsh
│ │ │ │ │ ├── Bulgarian.nlf
│ │ │ │ │ ├── Bulgarian.nsh
│ │ │ │ │ ├── Catalan.nlf
│ │ │ │ │ ├── Catalan.nsh
│ │ │ │ │ ├── Corsican.nlf
│ │ │ │ │ ├── Corsican.nsh
│ │ │ │ │ ├── Croatian.nlf
│ │ │ │ │ ├── Croatian.nsh
│ │ │ │ │ ├── Czech.nlf
│ │ │ │ │ ├── Czech.nsh
│ │ │ │ │ ├── Danish.nlf
│ │ │ │ │ ├── Danish.nsh
│ │ │ │ │ ├── Dutch.nlf
│ │ │ │ │ ├── Dutch.nsh
│ │ │ │ │ ├── English.nlf
│ │ │ │ │ ├── English.nsh
│ │ │ │ │ ├── Esperanto.nlf
│ │ │ │ │ ├── Esperanto.nsh
│ │ │ │ │ ├── Estonian.nlf
│ │ │ │ │ ├── Estonian.nsh
│ │ │ │ │ ├── Farsi.nlf
│ │ │ │ │ ├── Farsi.nsh
│ │ │ │ │ ├── Finnish.nlf
│ │ │ │ │ ├── Finnish.nsh
│ │ │ │ │ ├── French.nlf
│ │ │ │ │ ├── French.nsh
│ │ │ │ │ ├── Galician.nlf
│ │ │ │ │ ├── Galician.nsh
│ │ │ │ │ ├── Georgian.nlf
│ │ │ │ │ ├── Georgian.nsh
│ │ │ │ │ ├── German.nlf
│ │ │ │ │ ├── German.nsh
│ │ │ │ │ ├── Greek.nlf
│ │ │ │ │ ├── Greek.nsh
│ │ │ │ │ ├── Hebrew.nlf
│ │ │ │ │ ├── Hebrew.nsh
│ │ │ │ │ ├── Hindi.nlf
│ │ │ │ │ ├── Hindi.nsh
│ │ │ │ │ ├── Hungarian.nlf
│ │ │ │ │ ├── Hungarian.nsh
│ │ │ │ │ ├── Icelandic.nlf
│ │ │ │ │ ├── Icelandic.nsh
│ │ │ │ │ ├── Indonesian.nlf
│ │ │ │ │ ├── Indonesian.nsh
│ │ │ │ │ ├── Irish.nlf
│ │ │ │ │ ├── Irish.nsh
│ │ │ │ │ ├── Italian.nlf
│ │ │ │ │ ├── Italian.nsh
│ │ │ │ │ ├── Japanese.nlf
│ │ │ │ │ ├── Japanese.nsh
│ │ │ │ │ ├── Korean.nlf
│ │ │ │ │ ├── Korean.nsh
│ │ │ │ │ ├── Kurdish.nlf
│ │ │ │ │ ├── Kurdish.nsh
│ │ │ │ │ ├── Latvian.nlf
│ │ │ │ │ ├── Latvian.nsh
│ │ │ │ │ ├── Lithuanian.nlf
│ │ │ │ │ ├── Lithuanian.nsh
│ │ │ │ │ ├── Luxembourgish.nlf
│ │ │ │ │ ├── Luxembourgish.nsh
│ │ │ │ │ ├── Macedonian.nlf
│ │ │ │ │ ├── Macedonian.nsh
│ │ │ │ │ ├── Malay.nlf
│ │ │ │ │ ├── Malay.nsh
│ │ │ │ │ ├── Mongolian.nlf
│ │ │ │ │ ├── Mongolian.nsh
│ │ │ │ │ ├── Norwegian.nlf
│ │ │ │ │ ├── Norwegian.nsh
│ │ │ │ │ ├── NorwegianNynorsk.nlf
│ │ │ │ │ ├── NorwegianNynorsk.nsh
│ │ │ │ │ ├── Pashto.nlf
│ │ │ │ │ ├── Pashto.nsh
│ │ │ │ │ ├── Polish.nlf
│ │ │ │ │ ├── Polish.nsh
│ │ │ │ │ ├── Portuguese.nlf
│ │ │ │ │ ├── Portuguese.nsh
│ │ │ │ │ ├── PortugueseBR.nlf
│ │ │ │ │ ├── PortugueseBR.nsh
│ │ │ │ │ ├── Romanian.nlf
│ │ │ │ │ ├── Romanian.nsh
│ │ │ │ │ ├── Russian.nlf
│ │ │ │ │ ├── Russian.nsh
│ │ │ │ │ ├── ScotsGaelic.nlf
│ │ │ │ │ ├── ScotsGaelic.nsh
│ │ │ │ │ ├── Serbian.nlf
│ │ │ │ │ ├── Serbian.nsh
│ │ │ │ │ ├── SerbianLatin.nlf
│ │ │ │ │ ├── SerbianLatin.nsh
│ │ │ │ │ ├── SimpChinese.nlf
│ │ │ │ │ ├── SimpChinese.nsh
│ │ │ │ │ ├── Slovak.nlf
│ │ │ │ │ ├── Slovak.nsh
│ │ │ │ │ ├── Slovenian.nlf
│ │ │ │ │ ├── Slovenian.nsh
│ │ │ │ │ ├── Spanish.nlf
│ │ │ │ │ ├── Spanish.nsh
│ │ │ │ │ ├── SpanishInternational.nlf
│ │ │ │ │ ├── SpanishInternational.nsh
│ │ │ │ │ ├── Swedish.nlf
│ │ │ │ │ ├── Swedish.nsh
│ │ │ │ │ ├── Tatar.nlf
│ │ │ │ │ ├── Tatar.nsh
│ │ │ │ │ ├── Thai.nlf
│ │ │ │ │ ├── Thai.nsh
│ │ │ │ │ ├── TradChinese.nlf
│ │ │ │ │ ├── TradChinese.nsh
│ │ │ │ │ ├── Turkish.nlf
│ │ │ │ │ ├── Turkish.nsh
│ │ │ │ │ ├── Ukrainian.nlf
│ │ │ │ │ ├── Ukrainian.nsh
│ │ │ │ │ ├── Uzbek.nlf
│ │ │ │ │ ├── Uzbek.nsh
│ │ │ │ │ ├── Vietnamese.nlf
│ │ │ │ │ ├── Vietnamese.nsh
│ │ │ │ │ ├── Welsh.nlf
│ │ │ │ │ └── Welsh.nsh
│ │ │ │ ├── Modern UI/
│ │ │ │ │ ├── System.nsh
│ │ │ │ │ └── ioSpecial.ini
│ │ │ │ ├── Modern UI 2/
│ │ │ │ │ ├── Deprecated.nsh
│ │ │ │ │ ├── Interface.nsh
│ │ │ │ │ ├── Localization.nsh
│ │ │ │ │ ├── MUI2.nsh
│ │ │ │ │ ├── Pages/
│ │ │ │ │ │ ├── Components.nsh
│ │ │ │ │ │ ├── Directory.nsh
│ │ │ │ │ │ ├── Finish.nsh
│ │ │ │ │ │ ├── InstallFiles.nsh
│ │ │ │ │ │ ├── License.nsh
│ │ │ │ │ │ ├── StartMenu.nsh
│ │ │ │ │ │ ├── UninstallConfirm.nsh
│ │ │ │ │ │ └── Welcome.nsh
│ │ │ │ │ └── Pages.nsh
│ │ │ │ ├── SkinnedControls/
│ │ │ │ │ ├── SkinnedControls.c
│ │ │ │ │ ├── SkinnedControls.h
│ │ │ │ │ ├── SkinnedControls.sln
│ │ │ │ │ ├── SkinnedControls.vcproj
│ │ │ │ │ ├── api.h
│ │ │ │ │ ├── coolsb/
│ │ │ │ │ │ ├── coolsb.vcproj
│ │ │ │ │ │ ├── coolsb_detours.c
│ │ │ │ │ │ ├── coolsb_detours.h
│ │ │ │ │ │ ├── coolsb_internal.h
│ │ │ │ │ │ ├── coolsblib.c
│ │ │ │ │ │ ├── coolsblib.h
│ │ │ │ │ │ ├── coolscroll.c
│ │ │ │ │ │ ├── coolscroll.h
│ │ │ │ │ │ ├── detours.h
│ │ │ │ │ │ ├── detours.lib
│ │ │ │ │ │ └── userdefs.h
│ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ ├── pluginapi.c
│ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ ├── wa_dlg.h
│ │ │ │ │ ├── wa_scrollbars.c
│ │ │ │ │ └── wa_scrollbars.h
│ │ │ │ ├── UltraModernUI/
│ │ │ │ │ ├── BGSkins/
│ │ │ │ │ │ ├── SoftBlue.nsh
│ │ │ │ │ │ ├── SoftBrown.nsh
│ │ │ │ │ │ ├── SoftGray.nsh
│ │ │ │ │ │ ├── SoftGreen.nsh
│ │ │ │ │ │ ├── SoftPurple.nsh
│ │ │ │ │ │ ├── SoftRed.nsh
│ │ │ │ │ │ ├── blue.nsh
│ │ │ │ │ │ ├── blue2.nsh
│ │ │ │ │ │ ├── brown.nsh
│ │ │ │ │ │ ├── brown2.nsh
│ │ │ │ │ │ ├── darkgreen.nsh
│ │ │ │ │ │ ├── darkgreen2.nsh
│ │ │ │ │ │ ├── gray.nsh
│ │ │ │ │ │ ├── gray2.nsh
│ │ │ │ │ │ ├── green.nsh
│ │ │ │ │ │ ├── green2.nsh
│ │ │ │ │ │ ├── purple.nsh
│ │ │ │ │ │ ├── purple2.nsh
│ │ │ │ │ │ ├── red.nsh
│ │ │ │ │ │ └── red2.nsh
│ │ │ │ │ ├── Ini/
│ │ │ │ │ │ ├── AdditionalTasks.ini
│ │ │ │ │ │ ├── AlternateWelcomeFinishAbort.ini
│ │ │ │ │ │ ├── AlternateWelcomeFinishAbortImage.ini
│ │ │ │ │ │ ├── AlternativeStartMenu.ini
│ │ │ │ │ │ ├── Confirm.ini
│ │ │ │ │ │ ├── Information.ini
│ │ │ │ │ │ ├── MaintenanceUpdateSetupType.ini
│ │ │ │ │ │ ├── SerialNumber.ini
│ │ │ │ │ │ ├── WelcomeFinishAbort.ini
│ │ │ │ │ │ └── WelcomeFinishAbortImage.ini
│ │ │ │ │ ├── Language files/
│ │ │ │ │ │ ├── Afrikaans.nsh
│ │ │ │ │ │ ├── Albanian.nsh
│ │ │ │ │ │ ├── Arabic.nsh
│ │ │ │ │ │ ├── Armenian.nsh
│ │ │ │ │ │ ├── Asturian.nsh
│ │ │ │ │ │ ├── Basque.nsh
│ │ │ │ │ │ ├── Belarusian.nsh
│ │ │ │ │ │ ├── Bosnian.nsh
│ │ │ │ │ │ ├── Breton.nsh
│ │ │ │ │ │ ├── Bulgarian.nsh
│ │ │ │ │ │ ├── Catalan.nsh
│ │ │ │ │ │ ├── Corsican.nsh
│ │ │ │ │ │ ├── Croatian.nsh
│ │ │ │ │ │ ├── Czech.nsh
│ │ │ │ │ │ ├── Danish.nsh
│ │ │ │ │ │ ├── Dutch.nsh
│ │ │ │ │ │ ├── English.nsh
│ │ │ │ │ │ ├── Esperanto.nsh
│ │ │ │ │ │ ├── Estonian.nsh
│ │ │ │ │ │ ├── Farsi.nsh
│ │ │ │ │ │ ├── Finnish.nsh
│ │ │ │ │ │ ├── French.nsh
│ │ │ │ │ │ ├── Galician.nsh
│ │ │ │ │ │ ├── Georgian.nsh
│ │ │ │ │ │ ├── German.nsh
│ │ │ │ │ │ ├── Greek.nsh
│ │ │ │ │ │ ├── Hebrew.nsh
│ │ │ │ │ │ ├── Hindi.nsh
│ │ │ │ │ │ ├── Hungarian.nsh
│ │ │ │ │ │ ├── Icelandic.nsh
│ │ │ │ │ │ ├── Indonesian.nsh
│ │ │ │ │ │ ├── Irish.nsh
│ │ │ │ │ │ ├── Italian.nsh
│ │ │ │ │ │ ├── Japanese.nsh
│ │ │ │ │ │ ├── Korean.nsh
│ │ │ │ │ │ ├── Kurdish.nsh
│ │ │ │ │ │ ├── Latvian.nsh
│ │ │ │ │ │ ├── Lithuanian.nsh
│ │ │ │ │ │ ├── Luxembourgish.nsh
│ │ │ │ │ │ ├── Macedonian.nsh
│ │ │ │ │ │ ├── Malay.nsh
│ │ │ │ │ │ ├── Mongolian.nsh
│ │ │ │ │ │ ├── Norwegian.nsh
│ │ │ │ │ │ ├── NorwegianNynorsk.nsh
│ │ │ │ │ │ ├── Pashto.nsh
│ │ │ │ │ │ ├── Polish.nsh
│ │ │ │ │ │ ├── Portuguese.nsh
│ │ │ │ │ │ ├── PortugueseBR.nsh
│ │ │ │ │ │ ├── Romanian.nsh
│ │ │ │ │ │ ├── Russian.nsh
│ │ │ │ │ │ ├── ScotsGaelic.nsh
│ │ │ │ │ │ ├── Serbian.nsh
│ │ │ │ │ │ ├── SerbianLatin.nsh
│ │ │ │ │ │ ├── SimpChinese.nsh
│ │ │ │ │ │ ├── Slovak.nsh
│ │ │ │ │ │ ├── Slovenian.nsh
│ │ │ │ │ │ ├── Spanish.nsh
│ │ │ │ │ │ ├── SpanishInternational.nsh
│ │ │ │ │ │ ├── Swedish.nsh
│ │ │ │ │ │ ├── Tatar.nsh
│ │ │ │ │ │ ├── Thai.nsh
│ │ │ │ │ │ ├── TradChinese.nsh
│ │ │ │ │ │ ├── Turkish.nsh
│ │ │ │ │ │ ├── Ukrainian.nsh
│ │ │ │ │ │ ├── Uzbek.nsh
│ │ │ │ │ │ ├── Vietnamese.nsh
│ │ │ │ │ │ └── Welsh.nsh
│ │ │ │ │ ├── Skins/
│ │ │ │ │ │ ├── SoftBlue.nsh
│ │ │ │ │ │ ├── SoftBrown.nsh
│ │ │ │ │ │ ├── SoftGray.nsh
│ │ │ │ │ │ ├── SoftGreen.nsh
│ │ │ │ │ │ ├── SoftPurple.nsh
│ │ │ │ │ │ ├── SoftRed.nsh
│ │ │ │ │ │ ├── blue.nsh
│ │ │ │ │ │ ├── blue2.nsh
│ │ │ │ │ │ ├── brown.nsh
│ │ │ │ │ │ ├── brown2.nsh
│ │ │ │ │ │ ├── darkgreen.nsh
│ │ │ │ │ │ ├── darkgreen2.nsh
│ │ │ │ │ │ ├── gray.nsh
│ │ │ │ │ │ ├── gray2.nsh
│ │ │ │ │ │ ├── green.nsh
│ │ │ │ │ │ ├── green2.nsh
│ │ │ │ │ │ ├── purple.nsh
│ │ │ │ │ │ ├── purple2.nsh
│ │ │ │ │ │ ├── red.nsh
│ │ │ │ │ │ └── red2.nsh
│ │ │ │ │ └── UMUI.nsh
│ │ │ │ ├── nsArray/
│ │ │ │ │ ├── Array.c
│ │ │ │ │ ├── Array.h
│ │ │ │ │ ├── api.h
│ │ │ │ │ ├── nsArray.c
│ │ │ │ │ ├── nsArray.h
│ │ │ │ │ ├── nsArray.rc
│ │ │ │ │ ├── nsArray.sln
│ │ │ │ │ ├── nsArray.vcxproj
│ │ │ │ │ ├── nsArray.vcxproj.filters
│ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ ├── pluginapi.c
│ │ │ │ │ ├── pluginapi.h
│ │ │ │ │ └── resource.h
│ │ │ │ └── zip2exe/
│ │ │ │ ├── Base.nsh
│ │ │ │ ├── Classic.nsh
│ │ │ │ └── Modern.nsh
│ │ │ ├── Docs/
│ │ │ │ ├── AccessControl/
│ │ │ │ │ └── AccessControl.txt
│ │ │ │ ├── AdvSplash/
│ │ │ │ │ └── advsplash.txt
│ │ │ │ ├── Banner/
│ │ │ │ │ └── Readme.txt
│ │ │ │ ├── BgImage/
│ │ │ │ │ └── BgImage.txt
│ │ │ │ ├── Dialer/
│ │ │ │ │ └── Dialer.txt
│ │ │ │ ├── ExecDos/
│ │ │ │ │ └── Readme.txt
│ │ │ │ ├── InstallOptions/
│ │ │ │ │ ├── Changelog.txt
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── InstallOptionsEx/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── Readme.html
│ │ │ │ │ ├── basic.js
│ │ │ │ │ └── style.css
│ │ │ │ ├── Math/
│ │ │ │ │ └── Math.txt
│ │ │ │ ├── Modern UI/
│ │ │ │ │ ├── Changelog.txt
│ │ │ │ │ ├── License.txt
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── Modern UI 2/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── MultiUser/
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── NSISdl/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ └── ReadMe.txt
│ │ │ │ ├── NScurl/
│ │ │ │ │ └── NScurl.Readme.htm
│ │ │ │ ├── NSutils/
│ │ │ │ │ └── NSutils.Readme.txt
│ │ │ │ ├── NSxfer/
│ │ │ │ │ └── NSxfer.Readme.txt
│ │ │ │ ├── ShellLink/
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── SkinnedControls/
│ │ │ │ │ ├── Readme.html
│ │ │ │ │ ├── license.txt
│ │ │ │ │ ├── script.js
│ │ │ │ │ └── style.css
│ │ │ │ ├── Splash/
│ │ │ │ │ └── splash.txt
│ │ │ │ ├── StartMenu/
│ │ │ │ │ └── Readme.txt
│ │ │ │ ├── StrFunc/
│ │ │ │ │ └── StrFunc.txt
│ │ │ │ ├── System/
│ │ │ │ │ ├── System.html
│ │ │ │ │ └── WhatsNew.txt
│ │ │ │ ├── UltraModernUI/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── ReadMe.rtf
│ │ │ │ │ ├── ReadMe.txt
│ │ │ │ │ ├── Readme.html
│ │ │ │ │ ├── script.js
│ │ │ │ │ └── style.css
│ │ │ │ ├── VPatch/
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── makensisw/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ └── Readme.txt
│ │ │ │ ├── nsArray/
│ │ │ │ │ └── Readme.txt
│ │ │ │ ├── nsDialogs/
│ │ │ │ │ └── Readme.html
│ │ │ │ ├── nsExec/
│ │ │ │ │ └── nsExec.txt
│ │ │ │ └── w7tbp/
│ │ │ │ └── w7tbp.Readme.txt
│ │ │ ├── Examples/
│ │ │ │ ├── AdvSplash/
│ │ │ │ │ └── Example.nsi
│ │ │ │ ├── AppGen.nsi
│ │ │ │ ├── Banner/
│ │ │ │ │ └── Example.nsi
│ │ │ │ ├── BgImage/
│ │ │ │ │ └── Example.nsi
│ │ │ │ ├── ExecDos/
│ │ │ │ │ ├── Batch.nsi
│ │ │ │ │ ├── Detailed.nsi
│ │ │ │ │ ├── Example.nsi
│ │ │ │ │ ├── IsDone.nsi
│ │ │ │ │ ├── Multi.nsi
│ │ │ │ │ ├── ToFunc.nsi
│ │ │ │ │ ├── ToStack.nsi
│ │ │ │ │ ├── ToWindow.nsi
│ │ │ │ │ ├── first.bat
│ │ │ │ │ ├── listbox.ini
│ │ │ │ │ ├── ml_edit.ini
│ │ │ │ │ └── second.bat
│ │ │ │ ├── FileFunc.ini
│ │ │ │ ├── FileFunc.nsi
│ │ │ │ ├── FileFuncTest.nsi
│ │ │ │ ├── InstallOptions/
│ │ │ │ │ ├── test.ini
│ │ │ │ │ ├── test.nsi
│ │ │ │ │ ├── testimgs.ini
│ │ │ │ │ ├── testimgs.nsi
│ │ │ │ │ ├── testlink.ini
│ │ │ │ │ ├── testlink.nsi
│ │ │ │ │ ├── testnotify.ini
│ │ │ │ │ └── testnotify.nsi
│ │ │ │ ├── InstallOptionsEx/
│ │ │ │ │ ├── InstallOptionsEx.nsi
│ │ │ │ │ ├── test.ini
│ │ │ │ │ └── test.nsi
│ │ │ │ ├── Library.nsi
│ │ │ │ ├── LogicLib.nsi
│ │ │ │ ├── Math/
│ │ │ │ │ ├── math.nsi
│ │ │ │ │ ├── mathtest.ini
│ │ │ │ │ ├── mathtest.nsi
│ │ │ │ │ └── mathtest.txt
│ │ │ │ ├── Memento.nsi
│ │ │ │ ├── Modern UI/
│ │ │ │ │ ├── Basic.nsi
│ │ │ │ │ ├── HeaderBitmap.nsi
│ │ │ │ │ ├── MultiLanguage.nsi
│ │ │ │ │ ├── StartMenu.nsi
│ │ │ │ │ └── WelcomeFinish.nsi
│ │ │ │ ├── ModernXL.nsi
│ │ │ │ ├── NSISMenu.nsi
│ │ │ │ ├── NScurl/
│ │ │ │ │ ├── NScurl-Test-build.bat
│ │ │ │ │ └── NScurl-Test.nsi
│ │ │ │ ├── NSutils/
│ │ │ │ │ ├── NSutils-Test-build.bat
│ │ │ │ │ └── NSutils-Test.nsi
│ │ │ │ ├── NSxfer/
│ │ │ │ │ ├── NSxfer-Test-build.bat
│ │ │ │ │ └── NSxfer-Test.nsi
│ │ │ │ ├── Plugin/
│ │ │ │ │ ├── exdll-vs2008.sln
│ │ │ │ │ ├── exdll-vs2008.vcproj
│ │ │ │ │ ├── exdll.c
│ │ │ │ │ ├── exdll.dpr
│ │ │ │ │ ├── exdll.dsp
│ │ │ │ │ ├── exdll.dsw
│ │ │ │ │ ├── exdll_with_unit.dpr
│ │ │ │ │ ├── extdll.inc
│ │ │ │ │ ├── nsis/
│ │ │ │ │ │ ├── api.h
│ │ │ │ │ │ ├── nsis_tchar.h
│ │ │ │ │ │ ├── pluginapi-x86-ansi.lib
│ │ │ │ │ │ ├── pluginapi-x86-unicode.lib
│ │ │ │ │ │ └── pluginapi.h
│ │ │ │ │ └── nsis.pas
│ │ │ │ ├── SkinnedControls/
│ │ │ │ │ ├── Example.nsi
│ │ │ │ │ ├── Example_MUI.nsi
│ │ │ │ │ ├── Example_MUIEx.nsi
│ │ │ │ │ └── SkinnedControls.nsi
│ │ │ │ ├── Splash/
│ │ │ │ │ └── Example.nsi
│ │ │ │ ├── StartMenu/
│ │ │ │ │ └── Example.nsi
│ │ │ │ ├── StrFunc.nsi
│ │ │ │ ├── System/
│ │ │ │ │ ├── SysFunc.nsh
│ │ │ │ │ ├── System.nsh
│ │ │ │ │ └── System.nsi
│ │ │ │ ├── TextFunc.ini
│ │ │ │ ├── TextFunc.nsi
│ │ │ │ ├── TextFuncTest.nsi
│ │ │ │ ├── UltraModernUI/
│ │ │ │ │ ├── AdditionalTasks.nsi
│ │ │ │ │ ├── Basic.nsi
│ │ │ │ │ ├── Confirm.nsi
│ │ │ │ │ ├── FileDiskRequest.nsi
│ │ │ │ │ ├── HeaderBGImageEx.nsi
│ │ │ │ │ ├── HeaderBitmapEx.nsi
│ │ │ │ │ ├── Information.nsi
│ │ │ │ │ ├── InstallOptions.nsi
│ │ │ │ │ ├── Maintenance.nsi
│ │ │ │ │ ├── MultiLanguage.nsi
│ │ │ │ │ ├── NSISUMUIMenu.nsi
│ │ │ │ │ ├── NSISUltraModernUI.nsi
│ │ │ │ │ ├── NoLeftImage.nsi
│ │ │ │ │ ├── PageBG.nsi
│ │ │ │ │ ├── SerialNumber.nsi
│ │ │ │ │ ├── SetupType.nsi
│ │ │ │ │ ├── StartMenu.nsi
│ │ │ │ │ ├── UltraModernSmall.nsi
│ │ │ │ │ ├── UltraModernUI.nsi
│ │ │ │ │ ├── Update.nsi
│ │ │ │ │ ├── WelcomeFinishAbort.nsi
│ │ │ │ │ ├── bigtest.nsi
│ │ │ │ │ ├── information.txt
│ │ │ │ │ ├── information1033.txt
│ │ │ │ │ ├── information1036.txt
│ │ │ │ │ ├── ioA.ini
│ │ │ │ │ ├── ioB.ini
│ │ │ │ │ └── nsDialog.nsi
│ │ │ │ ├── UserInfo/
│ │ │ │ │ └── UserInfo.nsi
│ │ │ │ ├── UserVars.nsi
│ │ │ │ ├── VPatch/
│ │ │ │ │ ├── example.nsi
│ │ │ │ │ ├── newfile.txt
│ │ │ │ │ ├── oldfile.txt
│ │ │ │ │ └── patch.pat
│ │ │ │ ├── VersionInfo.nsi
│ │ │ │ ├── WordFunc.ini
│ │ │ │ ├── WordFunc.nsi
│ │ │ │ ├── WordFuncTest.nsi
│ │ │ │ ├── bigtest.nsi
│ │ │ │ ├── example1.nsi
│ │ │ │ ├── example2.nsi
│ │ │ │ ├── gfx.nsi
│ │ │ │ ├── install-per-user.nsi
│ │ │ │ ├── install-shared.nsi
│ │ │ │ ├── languages.nsi
│ │ │ │ ├── makensis.nsi
│ │ │ │ ├── nsArray/
│ │ │ │ │ ├── nsArray.nsi
│ │ │ │ │ └── nsArrayHeader.nsi
│ │ │ │ ├── nsDialogs/
│ │ │ │ │ ├── InstallOptions.nsi
│ │ │ │ │ ├── example.nsi
│ │ │ │ │ ├── timer.nsi
│ │ │ │ │ └── welcome.nsi
│ │ │ │ ├── nsExec/
│ │ │ │ │ └── test.nsi
│ │ │ │ ├── nsProcessTest.nsi
│ │ │ │ ├── one-section.nsi
│ │ │ │ ├── primes.nsi
│ │ │ │ ├── rtest.nsi
│ │ │ │ ├── silent.nsi
│ │ │ │ ├── unicode.nsi
│ │ │ │ ├── viewhtml.nsi
│ │ │ │ └── waplugin.nsi
│ │ │ ├── Include/
│ │ │ │ ├── Colors.nsh
│ │ │ │ ├── FileFunc.nsh
│ │ │ │ ├── InstallOptions.nsh
│ │ │ │ ├── Integration.nsh
│ │ │ │ ├── LangFile.nsh
│ │ │ │ ├── Library.nsh
│ │ │ │ ├── LogicLib.nsh
│ │ │ │ ├── MUI.nsh
│ │ │ │ ├── MUI2.nsh
│ │ │ │ ├── MUIEx.nsh
│ │ │ │ ├── Memento.nsh
│ │ │ │ ├── ModernXL.nsh
│ │ │ │ ├── ModernXXL.nsh
│ │ │ │ ├── MultiUser.nsh
│ │ │ │ ├── Sections.nsh
│ │ │ │ ├── StrFunc.nsh
│ │ │ │ ├── TextFunc.nsh
│ │ │ │ ├── UMUI.nsh
│ │ │ │ ├── UpgradeDLL.nsh
│ │ │ │ ├── Util.nsh
│ │ │ │ ├── VB6RunTime.nsh
│ │ │ │ ├── VPatchLib.nsh
│ │ │ │ ├── Win/
│ │ │ │ │ ├── COM.nsh
│ │ │ │ │ ├── Propkey.nsh
│ │ │ │ │ ├── WinDef.nsh
│ │ │ │ │ ├── WinError.nsh
│ │ │ │ │ ├── WinNT.nsh
│ │ │ │ │ └── WinUser.nsh
│ │ │ │ ├── WinCore.nsh
│ │ │ │ ├── WinMessages.nsh
│ │ │ │ ├── WinVer.nsh
│ │ │ │ ├── WordFunc.nsh
│ │ │ │ ├── nsArray.nsh
│ │ │ │ ├── nsDialogs.nsh
│ │ │ │ ├── nsProcess.nsh
│ │ │ │ └── x64.nsh
│ │ │ ├── NSIS.chm
│ │ │ ├── Stubs/
│ │ │ │ ├── bzip2-amd64-unicode
│ │ │ │ ├── bzip2-x86-ansi
│ │ │ │ ├── bzip2-x86-unicode
│ │ │ │ ├── bzip2_solid-amd64-unicode
│ │ │ │ ├── bzip2_solid-x86-ansi
│ │ │ │ ├── bzip2_solid-x86-unicode
│ │ │ │ ├── lzma-amd64-unicode
│ │ │ │ ├── lzma-x86-ansi
│ │ │ │ ├── lzma-x86-unicode
│ │ │ │ ├── lzma_solid-amd64-unicode
│ │ │ │ ├── lzma_solid-x86-ansi
│ │ │ │ ├── lzma_solid-x86-unicode
│ │ │ │ ├── uninst
│ │ │ │ ├── zlib-amd64-unicode
│ │ │ │ ├── zlib-x86-ansi
│ │ │ │ ├── zlib-x86-unicode
│ │ │ │ ├── zlib_solid-amd64-unicode
│ │ │ │ ├── zlib_solid-x86-ansi
│ │ │ │ └── zlib_solid-x86-unicode
│ │ │ └── nsisconf.nsh
│ │ └── wrap.cmd
│ ├── pkg/
│ │ ├── .gitignore
│ │ ├── Distribution.xml
│ │ ├── build.sh
│ │ ├── check-system.sh
│ │ ├── get-version.js
│ │ ├── install-fuse.sh
│ │ ├── launch-fuse.sh
│ │ ├── resources/
│ │ │ └── license.html
│ │ ├── scripts/
│ │ │ ├── postinstall
│ │ │ └── preinstall
│ │ └── version-gte.js
│ ├── platypus/
│ │ ├── fuse X.platypus
│ │ └── main.sh
│ ├── staple.sh
│ └── uninstall.sh
├── src/
│ ├── .gitignore
│ ├── GlobalAssemblyInfo.cs
│ ├── GlobalAssemblyInfo.targets
│ ├── common/
│ │ ├── core/
│ │ │ ├── ArgumentParseExtensions.cs
│ │ │ ├── Behaviors/
│ │ │ │ ├── IBehavior.cs
│ │ │ │ ├── IBehaviorSubject.cs
│ │ │ │ └── Operators/
│ │ │ │ ├── AsBehavior.cs
│ │ │ │ ├── CombineLatest.cs
│ │ │ │ ├── DistinctUntilChanged.cs
│ │ │ │ ├── Return.cs
│ │ │ │ ├── Select.cs
│ │ │ │ └── Switch.cs
│ │ │ ├── ColoredTextWriter.cs
│ │ │ ├── ConsoleExtensions.cs
│ │ │ ├── DateFormat.cs
│ │ │ ├── Diagnostics/
│ │ │ │ ├── AssemblyAnalyzer.cs
│ │ │ │ ├── CallerInfo.cs
│ │ │ │ ├── ConsoleTraceExtensions.cs
│ │ │ │ ├── ManualProfiling.cs
│ │ │ │ ├── ObservableTraceLogger.cs
│ │ │ │ ├── Platform.cs
│ │ │ │ ├── ProfilingEvent.cs
│ │ │ │ ├── ProfilingResult.cs
│ │ │ │ └── Reactive/
│ │ │ │ ├── IObservableTraceHandler.cs
│ │ │ │ └── ObservableTraceInfo.cs
│ │ │ ├── Disposable.cs
│ │ │ ├── Either.cs
│ │ │ ├── EqualityComparer.cs
│ │ │ ├── Extensions/
│ │ │ │ ├── BufferPrevious.cs
│ │ │ │ ├── EnumerableDiffing.cs
│ │ │ │ ├── EnumerableExtensions.cs
│ │ │ │ ├── EnumerableIndexing.cs
│ │ │ │ ├── EnumerableJoin.cs
│ │ │ │ ├── EnumerableSetOperations.cs
│ │ │ │ ├── ImmutableDictionaryExtensions.cs
│ │ │ │ ├── LiftedOperators/
│ │ │ │ │ ├── Cache.cs
│ │ │ │ │ ├── Select.cs
│ │ │ │ │ └── Where.cs
│ │ │ │ ├── ObjectExtensions.cs
│ │ │ │ ├── ObservableBooleans.cs
│ │ │ │ ├── ObservableExtensions.cs
│ │ │ │ ├── ObservableTuples.cs
│ │ │ │ ├── SelectWithState.cs
│ │ │ │ ├── StringExtensions.cs
│ │ │ │ ├── TaskExtensions.cs
│ │ │ │ ├── TestExtensions.cs
│ │ │ │ └── WithLatestFrom.cs
│ │ │ ├── ExternalApplications/
│ │ │ │ ├── AppBundle.cs
│ │ │ │ ├── ExternalApplication.cs
│ │ │ │ ├── MonoExe.cs
│ │ │ │ └── NativeExe.cs
│ │ │ ├── FileOperations/
│ │ │ │ ├── BackupFile.cs
│ │ │ │ ├── FileHelpers.cs
│ │ │ │ ├── FileSystemEventData.cs
│ │ │ │ ├── ForceWrite.cs
│ │ │ │ ├── IFilePermission.cs
│ │ │ │ ├── IFileSystem.cs
│ │ │ │ ├── IShell.cs
│ │ │ │ ├── MakePathUnique.cs
│ │ │ │ ├── Reading.cs
│ │ │ │ ├── RetryLoop.cs
│ │ │ │ ├── ShellHelper.cs
│ │ │ │ └── Writing.cs
│ │ │ ├── LineEndings.cs
│ │ │ ├── Logging/
│ │ │ │ ├── Formatter.cs
│ │ │ │ ├── IReport.cs
│ │ │ │ ├── LogFactory.cs
│ │ │ │ ├── NullLogger.cs
│ │ │ │ ├── Report.cs
│ │ │ │ ├── ReportFactory.cs
│ │ │ │ ├── UnhandledExceptionReporter.cs
│ │ │ │ └── UnixSocketLogClient.cs
│ │ │ ├── Lookups/
│ │ │ │ ├── DictionaryLookup.cs
│ │ │ │ ├── Grouping.cs
│ │ │ │ └── Lookup.cs
│ │ │ ├── Matching/
│ │ │ │ ├── DoExtension.cs
│ │ │ │ ├── DoSomeExtension.cs
│ │ │ │ ├── IMatchTypes.cs
│ │ │ │ ├── MatchSomeExtension.cs
│ │ │ │ └── MatchWithExtension.cs
│ │ │ ├── NetworkHelper.cs
│ │ │ ├── ObservableStack.cs
│ │ │ ├── OpenGlVersion.cs
│ │ │ ├── Outracks.Core.csproj
│ │ │ ├── Outracks.Core.csproj.DotSettings
│ │ │ ├── Paths/
│ │ │ │ ├── AbsoluteDirectoryPath.cs
│ │ │ │ ├── AbsoluteFilePath.cs
│ │ │ │ ├── DirectoryName.cs
│ │ │ │ ├── DirectoryPath.cs
│ │ │ │ ├── FileName.cs
│ │ │ │ ├── FilePath.cs
│ │ │ │ ├── Interfaces/
│ │ │ │ │ ├── IAbsolutePath.cs
│ │ │ │ │ ├── IDirectoryPath.cs
│ │ │ │ │ ├── IFilePath.cs
│ │ │ │ │ ├── IName.cs
│ │ │ │ │ ├── IPath.cs
│ │ │ │ │ └── IRelativePath.cs
│ │ │ │ ├── Operators/
│ │ │ │ │ ├── BinarySerialization.cs
│ │ │ │ │ ├── CombineWithName.cs
│ │ │ │ │ ├── CombineWithRelativePath.cs
│ │ │ │ │ ├── FindCommonAncestor.cs
│ │ │ │ │ ├── IsRootedIn.cs
│ │ │ │ │ ├── ParseNativePath.cs
│ │ │ │ │ ├── PathJsonConverter.cs
│ │ │ │ │ ├── RelativeTo.cs
│ │ │ │ │ └── Rename.cs
│ │ │ │ ├── RelativeDirectoryPath.cs
│ │ │ │ └── RelativeFilePath.cs
│ │ │ ├── Pipes/
│ │ │ │ ├── IPipeImpl.cs
│ │ │ │ ├── NamedPipes.cs
│ │ │ │ ├── Pipe.cs
│ │ │ │ ├── PipeName.cs
│ │ │ │ ├── SocketWin32.cs
│ │ │ │ ├── UnixSocketPipes.cs
│ │ │ │ └── UnixSocketStream.cs
│ │ │ ├── ProcessExtension.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ReplayQueueSubject.cs
│ │ │ ├── RethrowExtension.cs
│ │ │ ├── SequenceEqualityComparer.cs
│ │ │ ├── Serialization/
│ │ │ │ └── GuidSerializer.cs
│ │ │ ├── SetEqualityComparer.cs
│ │ │ ├── SetInvariantCultureExtension.cs
│ │ │ ├── SingleActionQueue.cs
│ │ │ ├── StringToMemoryStream.cs
│ │ │ ├── SystemGuidLoader.cs
│ │ │ ├── SystemInfo/
│ │ │ │ └── SystemInfoFactory.cs
│ │ │ ├── Text.cs
│ │ │ ├── TextDocumentContent.cs
│ │ │ ├── TrySomethingExtension.cs
│ │ │ ├── ValidationResult.cs
│ │ │ └── packages.config
│ │ ├── math/
│ │ │ ├── Axis2D.cs
│ │ │ ├── ContentFrame.cs
│ │ │ ├── Corners.cs
│ │ │ ├── Discrete/
│ │ │ │ ├── CycleDetected.cs
│ │ │ │ ├── GraphInversion.cs
│ │ │ │ ├── ReachableSet.cs
│ │ │ │ ├── SetClosure.cs
│ │ │ │ └── TopologicalSort.cs
│ │ │ ├── IGroup.cs
│ │ │ ├── INumeric.cs
│ │ │ ├── IRing.cs
│ │ │ ├── Interval.cs
│ │ │ ├── Matrix.cs
│ │ │ ├── Operators/
│ │ │ │ ├── Add.cs
│ │ │ │ ├── Algebra.cs
│ │ │ │ ├── Clamp.cs
│ │ │ │ ├── Div.cs
│ │ │ │ ├── GreaterThan.cs
│ │ │ │ ├── Inflate.cs
│ │ │ │ ├── Intersect.cs
│ │ │ │ ├── LessThan.cs
│ │ │ │ ├── Max.cs
│ │ │ │ ├── Min.cs
│ │ │ │ ├── Mul.cs
│ │ │ │ ├── ReactiveExtensions.cs
│ │ │ │ ├── RelativeTo.cs
│ │ │ │ ├── Round.cs
│ │ │ │ ├── Select.cs
│ │ │ │ ├── Sub.cs
│ │ │ │ ├── Subdivide.cs
│ │ │ │ ├── Transpose.cs
│ │ │ │ └── Union.cs
│ │ │ ├── Outracks.Math.csproj
│ │ │ ├── Point.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Ratio.cs
│ │ │ ├── Rectangle.cs
│ │ │ ├── Size.cs
│ │ │ ├── Thickness.cs
│ │ │ ├── Units/
│ │ │ │ ├── ClipSpaceUnits.cs
│ │ │ │ ├── GlWindowPixels.cs
│ │ │ │ ├── Inches.cs
│ │ │ │ ├── Percentages.cs
│ │ │ │ ├── Pixels.cs
│ │ │ │ ├── Points.cs
│ │ │ │ └── TextureSpaceUnits.cs
│ │ │ ├── Vector.cs
│ │ │ └── packages.config
│ │ ├── testproc/
│ │ │ ├── Outracks.TestProcess.csproj
│ │ │ ├── Program.cs
│ │ │ └── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── tests/
│ │ │ ├── DateFormatTests.cs
│ │ │ ├── Diagnostics/
│ │ │ │ └── ConsoleTraceExtensionTests.cs
│ │ │ ├── DistinctUntilChanged.cs
│ │ │ ├── Extensions/
│ │ │ │ └── LiftedOperators/
│ │ │ │ └── CacheExtensionTests.cs
│ │ │ ├── FormatterTests.cs
│ │ │ ├── Helpers.cs
│ │ │ ├── JsonPathTests.cs
│ │ │ ├── MatchWithTest.cs
│ │ │ ├── NetworkHelperTests.cs
│ │ │ ├── ObservableStackTests.cs
│ │ │ ├── Outracks.Tests.csproj
│ │ │ ├── Paths/
│ │ │ │ ├── FileNameTest.cs
│ │ │ │ └── FilePathTests.cs
│ │ │ ├── Pipes/
│ │ │ │ └── UnixSocketStreamTests.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── RemoteTaskTest.cs
│ │ │ ├── ReplayQueueSubjectTest.cs
│ │ │ ├── ReportTest.cs
│ │ │ ├── RestrictToAttribute.cs
│ │ │ ├── SingleActionQueueTests.cs
│ │ │ ├── SubscribeUsing.cs
│ │ │ ├── TextPositionTests.cs
│ │ │ ├── WithLatestFrom.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ └── text/
│ │ ├── CharacterNumber.cs
│ │ ├── FilePosition.cs
│ │ ├── LineNumber.cs
│ │ ├── Outracks.Text.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── TextOffset.cs
│ │ ├── TextOffsetConversion.cs
│ │ ├── TextPosition.cs
│ │ ├── TextRegion.cs
│ │ ├── TextScanner.cs
│ │ └── packages.config
│ ├── entrypoint/
│ │ ├── cli/
│ │ │ ├── Entrypoint.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── app.config
│ │ │ ├── app.manifest
│ │ │ ├── fuse.csproj
│ │ │ ├── fuse.js
│ │ │ └── packages.config
│ │ ├── code-assistance/
│ │ │ ├── CodeCompletionInstance.cs
│ │ │ ├── CodeCompletionMessages.cs
│ │ │ ├── EditorManager.cs
│ │ │ ├── Engine.cs
│ │ │ ├── GoToDefinitionFeature.cs
│ │ │ ├── Logger.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── SuggestionsFeature.cs
│ │ │ ├── SyntaxLanguage.cs
│ │ │ ├── app.config
│ │ │ ├── fuse-lang.csproj
│ │ │ └── packages.config
│ │ └── uri-handler/
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── UriHandler.cs
│ │ └── fuse-uri.csproj
│ ├── fuse/
│ │ ├── command/
│ │ │ ├── CliCommand.cs
│ │ │ ├── CliProgram.cs
│ │ │ ├── Commands/
│ │ │ │ ├── BuildCommand.cs
│ │ │ │ ├── CleanCommand.cs
│ │ │ │ ├── ConfigCommand.cs
│ │ │ │ ├── CreateCommand.cs
│ │ │ │ ├── DaemonClientCommand.cs
│ │ │ │ ├── DaemonCommand.cs
│ │ │ │ ├── DashboardCommand.cs
│ │ │ │ ├── EventViewerCommand.cs
│ │ │ │ ├── HelpCommand.cs
│ │ │ │ ├── ImportCommand.cs
│ │ │ │ ├── InstallCommand.cs
│ │ │ │ ├── KillAllCommand.cs
│ │ │ │ ├── OpenCommand.cs
│ │ │ │ ├── Preview/
│ │ │ │ │ ├── ConsoleEventWriter.cs
│ │ │ │ │ ├── ErrorHelpers/
│ │ │ │ │ │ └── MissingRequiredPackageReferences.cs
│ │ │ │ │ ├── ExportTargetNotSupported.cs
│ │ │ │ │ ├── PreviewArgumentResolver.cs
│ │ │ │ │ ├── PreviewArguments.cs
│ │ │ │ │ ├── PreviewCommand.cs
│ │ │ │ │ ├── PreviewExported.cs
│ │ │ │ │ ├── PreviewMain.cs
│ │ │ │ │ ├── ResetPreviewCliCommand.cs
│ │ │ │ │ └── UnknownDocumentOrProjectType.cs
│ │ │ │ ├── TutorialCommand.cs
│ │ │ │ └── UriCommand.cs
│ │ │ ├── ExceptionWriter.cs
│ │ │ ├── ExitWithError.cs
│ │ │ ├── HelpTools.cs
│ │ │ ├── LazyCliCommand.cs
│ │ │ ├── Outracks.Fuse.Command.csproj
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Table.cs
│ │ │ ├── TableWriter.cs
│ │ │ ├── UnknownCommand.cs
│ │ │ ├── UnoConfigExtensions.cs
│ │ │ ├── VersionWriter.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── common/
│ │ │ ├── Auth/
│ │ │ │ ├── Hardware.cs
│ │ │ │ ├── ILicense.cs
│ │ │ │ ├── ILicenseState.cs
│ │ │ │ ├── License.cs
│ │ │ │ ├── LicenseData.cs
│ │ │ │ ├── LicenseStatus.cs
│ │ │ │ ├── Storage.cs
│ │ │ │ ├── UriHandler.cs
│ │ │ │ └── Utilities/
│ │ │ │ ├── BASE36.cs
│ │ │ │ ├── GZip.cs
│ │ │ │ └── Win32HardwareInfo.cs
│ │ │ ├── DefaultApplicationWin.cs
│ │ │ ├── ExportTargetNotSupported.cs
│ │ │ ├── FileExtensions.cs
│ │ │ ├── FileFilters.cs
│ │ │ ├── FuseApi.cs
│ │ │ ├── FuseImpl.cs
│ │ │ ├── IFuse.cs
│ │ │ ├── IFuseLauncher.cs
│ │ │ ├── KillAll/
│ │ │ │ ├── FuseKiller.cs
│ │ │ │ ├── IFuseKiller.cs
│ │ │ │ ├── MacFuseKiller.cs
│ │ │ │ └── WinFuseKiller.cs
│ │ │ ├── Net/
│ │ │ │ └── FuseWebClient.cs
│ │ │ ├── Outracks.Fuse.csproj
│ │ │ ├── Outracks.Fuse.csproj.DotSettings
│ │ │ ├── Parsed.cs
│ │ │ ├── ProjectDetector.cs
│ │ │ ├── ProjectNotFound.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Protocol/
│ │ │ │ ├── Auth/
│ │ │ │ │ └── LicenseEvent.cs
│ │ │ │ ├── Building/
│ │ │ │ │ ├── BuildEnded.cs
│ │ │ │ │ ├── BuildIssueDetected.cs
│ │ │ │ │ ├── BuildLogged.cs
│ │ │ │ │ └── BuildStarted.cs
│ │ │ │ ├── Client.cs
│ │ │ │ ├── ConnectAndGreet.cs
│ │ │ │ ├── ConnectWithReconnect.cs
│ │ │ │ ├── Core/
│ │ │ │ │ ├── FocusDesignerRequest.cs
│ │ │ │ │ ├── FocusDesignerResponse.cs
│ │ │ │ │ ├── FocusEditorRequest.cs
│ │ │ │ │ ├── FocusEditorResponse.cs
│ │ │ │ │ ├── Hello.cs
│ │ │ │ │ ├── KillRequest.cs
│ │ │ │ │ ├── KillResponse.cs
│ │ │ │ │ ├── ProjectClosed.cs
│ │ │ │ │ ├── PublishService.cs
│ │ │ │ │ ├── Subscribe.cs
│ │ │ │ │ ├── Unsubscribe.cs
│ │ │ │ │ └── Welcome.cs
│ │ │ │ ├── DaemonKey.cs
│ │ │ │ ├── DaemonSpawner.cs
│ │ │ │ ├── Event.cs
│ │ │ │ ├── IMessage.cs
│ │ │ │ ├── IMessagingService.cs
│ │ │ │ ├── LocalSocketClient.cs
│ │ │ │ ├── LocalSocketServer.cs
│ │ │ │ ├── MessageManager.cs
│ │ │ │ ├── NullObjects.cs
│ │ │ │ ├── PayloadParserContext.cs
│ │ │ │ ├── Preview/
│ │ │ │ │ ├── ExceptionEvent.cs
│ │ │ │ │ ├── LogEvent.cs
│ │ │ │ │ ├── ProjectIdComputer.cs
│ │ │ │ │ ├── RegisterClientEvent.cs
│ │ │ │ │ └── TextPosition.cs
│ │ │ │ ├── Request.cs
│ │ │ │ ├── RequestSender.cs
│ │ │ │ ├── ResetPreviewEvent.cs
│ │ │ │ ├── Response.cs
│ │ │ │ ├── SelectionChanged.cs
│ │ │ │ ├── Serializer.cs
│ │ │ │ └── SwitchingMessagingService.cs
│ │ │ ├── SourceFragment.cs
│ │ │ ├── UxExpression.cs
│ │ │ ├── UxSize.cs
│ │ │ ├── UxWriter.cs
│ │ │ ├── WebLinks.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── daemon/
│ │ │ ├── DaemonRunner.cs
│ │ │ ├── EnsureSingleInstanceFactory.cs
│ │ │ ├── EnsureSingleUser.cs
│ │ │ ├── ErrorListIntercepter.cs
│ │ │ ├── Identity.cs
│ │ │ ├── Outracks.Fuse.Daemon.csproj
│ │ │ ├── PluginClient.cs
│ │ │ ├── PluginClients.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ReadUntilExtension.cs
│ │ │ ├── ServiceRunner.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── locale/
│ │ │ ├── LocaleCulture.cs
│ │ │ ├── Outracks.Fuse.Locale.csproj
│ │ │ ├── Strings.Designer.cs
│ │ │ ├── Strings.fr-FR.resx
│ │ │ ├── Strings.ko-KR.resx
│ │ │ └── Strings.resx
│ │ ├── sandbox/
│ │ │ ├── .gitignore
│ │ │ ├── AutoReloadContent.cs
│ │ │ ├── AutoReloadProgram.cs
│ │ │ ├── Info.plist
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── Resources/
│ │ │ │ └── DIR
│ │ │ ├── app.config
│ │ │ ├── fuse-sandbox.csproj
│ │ │ └── packages.config
│ │ ├── studio/
│ │ │ ├── About.cs
│ │ │ ├── Activate.cs
│ │ │ ├── App.config
│ │ │ ├── ApplicationPaths.cs
│ │ │ ├── BehaviorSubjectExtensions.cs
│ │ │ ├── Build.cs
│ │ │ ├── BuildArgs.cs
│ │ │ ├── BuildFlagsWindow.cs
│ │ │ ├── CodeView.cs
│ │ │ ├── Components/
│ │ │ │ ├── AndroidBuildTools.cs
│ │ │ │ ├── AtomPlugin.cs
│ │ │ │ ├── ComponentInstaller.cs
│ │ │ │ ├── ComponentInstallers.cs
│ │ │ │ ├── ScriptInstaller.cs
│ │ │ │ ├── SublimePlugin.cs
│ │ │ │ ├── VsCodeExtension.cs
│ │ │ │ └── VsCodePlugin.cs
│ │ │ ├── Controls/
│ │ │ │ ├── BrowseButton.cs
│ │ │ │ ├── ConfirmCancelControl.cs
│ │ │ │ └── FilePathControl.cs
│ │ │ ├── Dashboard/
│ │ │ │ ├── CreateProject.cs
│ │ │ │ ├── Dashboard.cs
│ │ │ │ ├── ProjectList.cs
│ │ │ │ ├── ProjectListItem.cs
│ │ │ │ └── ProjectListItemControl.cs
│ │ │ ├── ElementContext.cs
│ │ │ ├── Export.cs
│ │ │ ├── ExternalSelection.cs
│ │ │ ├── FocusEditorCommand.cs
│ │ │ ├── GlVersionParsing.cs
│ │ │ ├── Icons/
│ │ │ │ ├── AlignmentIcon.cs
│ │ │ │ ├── Icons.cs
│ │ │ │ ├── MinimizeAndMaximizeIcon.cs
│ │ │ │ ├── SelectionIcon.cs
│ │ │ │ ├── StackIcon.cs
│ │ │ │ ├── TextAlignmentIcon.cs
│ │ │ │ └── TouchIcon.cs
│ │ │ ├── Import/
│ │ │ │ ├── ImportFailed.cs
│ │ │ │ └── ImportOperation.cs
│ │ │ ├── Info.plist
│ │ │ ├── LanguageMenu.cs
│ │ │ ├── MainMenu/
│ │ │ │ ├── CheckForUpdates.cs
│ │ │ │ ├── Help.cs
│ │ │ │ ├── MainMenu.cs
│ │ │ │ └── ProjectMenu.cs
│ │ │ ├── MainWindow/
│ │ │ │ ├── Busy.cs
│ │ │ │ ├── Hierarchy/
│ │ │ │ │ ├── DropPosition.cs
│ │ │ │ │ ├── ITreeRowViewModel.cs
│ │ │ │ │ ├── ITreeViewModel.cs
│ │ │ │ │ ├── InsertionRod.cs
│ │ │ │ │ ├── PendingDrop.cs
│ │ │ │ │ ├── TreeRowView.cs
│ │ │ │ │ ├── TreeView.cs
│ │ │ │ │ ├── TreeViewModel.RowModel.cs
│ │ │ │ │ └── TreeViewModel.cs
│ │ │ │ ├── Inspector/
│ │ │ │ │ ├── AttributeIntercepter.cs
│ │ │ │ │ ├── CellLayout.cs
│ │ │ │ │ ├── Editors/
│ │ │ │ │ │ ├── Color.cs
│ │ │ │ │ │ ├── Dropdown.cs
│ │ │ │ │ │ ├── EditorControl.cs
│ │ │ │ │ │ ├── Expression.cs
│ │ │ │ │ │ ├── Factory.cs
│ │ │ │ │ │ ├── Field.cs
│ │ │ │ │ │ ├── FilePathEditor.cs
│ │ │ │ │ │ ├── Label.cs
│ │ │ │ │ │ ├── List.cs
│ │ │ │ │ │ ├── ListButtons.cs
│ │ │ │ │ │ ├── RadioButton.cs
│ │ │ │ │ │ ├── Slider.cs
│ │ │ │ │ │ └── Switch.cs
│ │ │ │ │ ├── IEditorFactory.cs
│ │ │ │ │ ├── Inspector.cs
│ │ │ │ │ └── Sections/
│ │ │ │ │ ├── Advanced/
│ │ │ │ │ │ ├── Attributes.cs
│ │ │ │ │ │ ├── Layout/
│ │ │ │ │ │ │ ├── AlignmentEditor.cs
│ │ │ │ │ │ │ ├── CustomRadioButton.cs
│ │ │ │ │ │ │ ├── DockEditor.cs
│ │ │ │ │ │ │ ├── ElementDockPanelExtensions.cs
│ │ │ │ │ │ │ └── Spacing.cs
│ │ │ │ │ │ ├── Layout.cs
│ │ │ │ │ │ ├── SizePosition.cs
│ │ │ │ │ │ ├── Style/
│ │ │ │ │ │ │ ├── DropShadow.cs
│ │ │ │ │ │ │ ├── LinearGradient.cs
│ │ │ │ │ │ │ ├── SolidColor.cs
│ │ │ │ │ │ │ └── Stroke.cs
│ │ │ │ │ │ ├── Style.cs
│ │ │ │ │ │ ├── Transform/
│ │ │ │ │ │ │ └── Rotation.cs
│ │ │ │ │ │ ├── Transform.cs
│ │ │ │ │ │ └── Visibility.cs
│ │ │ │ │ ├── Advanced.cs
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── Circle.cs
│ │ │ │ │ │ ├── Each.cs
│ │ │ │ │ │ ├── Grid.cs
│ │ │ │ │ │ ├── Image.cs
│ │ │ │ │ │ ├── ScrollView.cs
│ │ │ │ │ │ ├── StackPanel.cs
│ │ │ │ │ │ ├── Text.cs
│ │ │ │ │ │ ├── TextInput.cs
│ │ │ │ │ │ └── WrapPanel.cs
│ │ │ │ │ └── Common.cs
│ │ │ │ ├── LogView/
│ │ │ │ │ ├── ErrorView.cs
│ │ │ │ │ ├── LogView.cs
│ │ │ │ │ ├── LogViewHeader.cs
│ │ │ │ │ └── LogViewTab.cs
│ │ │ │ ├── MainWindow.cs
│ │ │ │ ├── MainWindowIcons.cs
│ │ │ │ ├── Notification.cs
│ │ │ │ ├── Stage/
│ │ │ │ │ ├── FocusBox.cs
│ │ │ │ │ ├── Gizmos/
│ │ │ │ │ │ ├── BoxFactory.cs
│ │ │ │ │ │ ├── ChangeSelection.cs
│ │ │ │ │ │ ├── ChangeTool.cs
│ │ │ │ │ │ ├── Gizmos.cs
│ │ │ │ │ │ ├── HitBoxes.cs
│ │ │ │ │ │ └── PluginUnoHelpers.cs
│ │ │ │ │ ├── IStage.cs
│ │ │ │ │ ├── IViewport.cs
│ │ │ │ │ ├── Primitives.cs
│ │ │ │ │ ├── StageController.cs
│ │ │ │ │ ├── StageView.cs
│ │ │ │ │ ├── ViewportController.cs
│ │ │ │ │ ├── ViewportFactory.cs
│ │ │ │ │ └── VirtualDevices/
│ │ │ │ │ ├── DeviceScreen.cs
│ │ │ │ │ ├── Devices.cs
│ │ │ │ │ ├── DevicesMenu.cs
│ │ │ │ │ ├── MalformedDeviceInfo.cs
│ │ │ │ │ ├── PreviewDevices.cs
│ │ │ │ │ ├── VirtualDevice.cs
│ │ │ │ │ └── devices.json
│ │ │ │ └── Toolbox/
│ │ │ │ └── Toolbox.cs
│ │ │ ├── NagScreen.cs
│ │ │ ├── OpenFolder.cs
│ │ │ ├── OpenProject.cs
│ │ │ ├── OpenTerminal.cs
│ │ │ ├── OpenTextEditor.cs
│ │ │ ├── PreviewOnDevice.cs
│ │ │ ├── Program.cs
│ │ │ ├── Project/
│ │ │ │ ├── Attribute.Convert.cs
│ │ │ │ ├── Attribute.Focus.cs
│ │ │ │ ├── Attribute.cs
│ │ │ │ ├── Converters/
│ │ │ │ │ ├── Angle.cs
│ │ │ │ │ ├── Boolean.cs
│ │ │ │ │ ├── Color.cs
│ │ │ │ │ ├── Enum.cs
│ │ │ │ │ ├── Scalar.cs
│ │ │ │ │ ├── String.cs
│ │ │ │ │ ├── TimeSpan.cs
│ │ │ │ │ ├── UxSize.cs
│ │ │ │ │ └── Vector.cs
│ │ │ │ ├── Element.Empty.cs
│ │ │ │ ├── Element.Subtree.cs
│ │ │ │ ├── Element.Switch.cs
│ │ │ │ ├── Element.cs
│ │ │ │ ├── IAttribute.cs
│ │ │ │ ├── IContext.cs
│ │ │ │ ├── IDocument.cs
│ │ │ │ ├── IElement.cs
│ │ │ │ ├── ILiveElement.cs
│ │ │ │ ├── IProject.cs
│ │ │ │ ├── Live/
│ │ │ │ │ ├── Context.cs
│ │ │ │ │ ├── FileWatchingDocument.cs
│ │ │ │ │ ├── LiveDocument.cs
│ │ │ │ │ ├── LiveElement.CutCopyPaste.cs
│ │ │ │ │ ├── LiveElement.Is.cs
│ │ │ │ │ ├── LiveElement.IsChildOf.cs
│ │ │ │ │ ├── LiveElement.IsSiblingOf.cs
│ │ │ │ │ ├── LiveElement.Update.cs
│ │ │ │ │ ├── LiveElement.cs
│ │ │ │ │ ├── LiveProject.cs
│ │ │ │ │ ├── ProjectWatcher.cs
│ │ │ │ │ ├── PushEventsToDaemon.cs
│ │ │ │ │ └── XElementExtensions.cs
│ │ │ │ ├── SpecialProperties.cs
│ │ │ │ └── Where.cs
│ │ │ ├── ProjectData.cs
│ │ │ ├── ProjectHost.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── RecentProjects.cs
│ │ │ ├── Refactoring/
│ │ │ │ ├── ClassExtractor.cs
│ │ │ │ ├── ExtractClassButtonViewModel.cs
│ │ │ │ ├── ExtractClassView.cs
│ │ │ │ ├── ExtractClassViewModel.cs
│ │ │ │ ├── IClassExtractor.cs
│ │ │ │ ├── IExtractClassButtonViewModel.cs
│ │ │ │ ├── IExtractClassViewModel.cs
│ │ │ │ └── OverlayConfirmCancelDialog.cs
│ │ │ ├── RespondToFocusRequests.cs
│ │ │ ├── Setup/
│ │ │ │ ├── InstallStatus.cs
│ │ │ │ ├── MissingAndroidNotification.cs
│ │ │ │ ├── MissingPluginNotification.cs
│ │ │ │ ├── SetupGuide.cs
│ │ │ │ ├── SoftwareStatus.cs
│ │ │ │ ├── SublimeAppStatus.cs
│ │ │ │ ├── SublimePluginStatus.cs
│ │ │ │ ├── VsCodeAppStatus.cs
│ │ │ │ └── VsCodeExtensionStatus.cs
│ │ │ ├── SimulatorNotifications.cs
│ │ │ ├── Sketch/
│ │ │ │ ├── SketchLogWrapper.cs
│ │ │ │ ├── SketchWatchExtensions.cs
│ │ │ │ └── SketchWatcher.cs
│ │ │ ├── Templates/
│ │ │ │ ├── DirectoryToNamespace.cs
│ │ │ │ ├── FileAlreadyExist.cs
│ │ │ │ ├── ITemplateVariableResolver.cs
│ │ │ │ ├── NamespaceName.cs
│ │ │ │ ├── ProjectFolderNotEmpty.cs
│ │ │ │ ├── SpawnTemplate.cs
│ │ │ │ ├── Template.cs
│ │ │ │ ├── TemplateLoader.cs
│ │ │ │ ├── TemplateManifestParser.cs
│ │ │ │ ├── TemplateParseError.cs
│ │ │ │ ├── TemplateParser.cs
│ │ │ │ ├── TemplateSpawner.cs
│ │ │ │ ├── TemplateToken.cs
│ │ │ │ └── TemplateVariableResolver.cs
│ │ │ ├── Testing/
│ │ │ │ ├── ConsoleOutputWindow.cs
│ │ │ │ ├── Debug.cs
│ │ │ │ ├── IconPreviewWindow.cs
│ │ │ │ ├── RandomMutatorWindow.cs
│ │ │ │ └── RandomUxMutator.cs
│ │ │ ├── Texts.cs
│ │ │ ├── Theming/
│ │ │ │ ├── Arrow.cs
│ │ │ │ ├── Buttons.cs
│ │ │ │ ├── CheckBox.cs
│ │ │ │ ├── LogoAndVersion.cs
│ │ │ │ ├── Modal.cs
│ │ │ │ ├── Popover.cs
│ │ │ │ ├── Separator.cs
│ │ │ │ ├── Spacer.cs
│ │ │ │ ├── Theme.cs
│ │ │ │ ├── ThemedButton.cs
│ │ │ │ ├── ThemedTextBox.cs
│ │ │ │ └── Themes/
│ │ │ │ ├── ColorMap.cs
│ │ │ │ ├── ITheme.cs
│ │ │ │ ├── OriginalDarkTheme.cs
│ │ │ │ ├── OriginalLightTheme.cs
│ │ │ │ └── Themes.cs
│ │ │ ├── USBMode.cs
│ │ │ ├── app.manifest
│ │ │ ├── fuse-studio.csproj
│ │ │ ├── fuse-studio.csproj.DotSettings
│ │ │ └── packages.config
│ │ ├── system-test/
│ │ │ ├── FuseRunner.cs
│ │ │ ├── IOHelpers.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── ScreenCapture.cs
│ │ │ ├── SystemTest.cs
│ │ │ ├── TestHelpers.cs
│ │ │ ├── Tests/
│ │ │ │ ├── AutomaticTestApp.cs
│ │ │ │ ├── FuseBuild.cs
│ │ │ │ ├── FuseCreate.cs
│ │ │ │ ├── FuseImport.cs
│ │ │ │ ├── FuseInstallAndroid.cs
│ │ │ │ └── PreviewTest.cs
│ │ │ ├── packages.config
│ │ │ └── system-test.csproj
│ │ ├── tests/
│ │ │ ├── ApplicationPathsTests.cs
│ │ │ ├── Common/
│ │ │ │ └── ContextTests.cs
│ │ │ ├── Components/
│ │ │ │ └── ComponentInstallerTests.cs
│ │ │ ├── Create/
│ │ │ │ ├── ProjectAddRemoveCornerCaseTests.cs
│ │ │ │ ├── ProjectMoveTests.cs
│ │ │ │ ├── ProjectRedundancyEliminationTests.cs
│ │ │ │ ├── ProjectTest.cs
│ │ │ │ ├── TemplateTest.cs
│ │ │ │ └── TemplateVariableResolverDummy.cs
│ │ │ ├── EnvironmentTest.cs
│ │ │ ├── FailureClient.cs
│ │ │ ├── FileWatchingDocumentTest.cs
│ │ │ ├── Hierarchy/
│ │ │ │ ├── LiveElementExtensions.cs
│ │ │ │ └── TreeViewModelTests.cs
│ │ │ ├── LiveElementFactory.cs
│ │ │ ├── Main/
│ │ │ │ ├── BuildArgsTests.cs
│ │ │ │ ├── GlVersionParsingTests.cs
│ │ │ │ └── SelectionTests.cs
│ │ │ ├── Markup/
│ │ │ │ ├── ElementTest.cs
│ │ │ │ └── SourceFragmentTest.cs
│ │ │ ├── MessageDatabase.cs
│ │ │ ├── MessageDatabaseItem.cs
│ │ │ ├── MessageIntegrityTests.cs
│ │ │ ├── Messages/
│ │ │ │ ├── GetCodeSuggestionResponse.msgDB
│ │ │ │ ├── GetCodeSuggestionsRequest.msgDB
│ │ │ │ ├── GotoDefinitionRequest.msgDB
│ │ │ │ ├── GotoDefinitionResponse.msgDB
│ │ │ │ ├── HelloRequest.msgDB
│ │ │ │ └── HelloResponse.msgDB
│ │ │ ├── Outracks.Fuse.Tests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Refactoring/
│ │ │ │ ├── ClassExtractorTests.cs
│ │ │ │ ├── ExtractClassButtonViewModelTests.cs
│ │ │ │ └── ExtractClassViewModelTests.cs
│ │ │ ├── Setup/
│ │ │ │ └── ComponentStatusExetensionsTest.cs
│ │ │ ├── Sketch/
│ │ │ │ └── SketchWatcherTests.cs
│ │ │ ├── Solution/
│ │ │ │ ├── NugetPackageElement.cs
│ │ │ │ ├── SolutionTestsHelper.cs
│ │ │ │ └── SolutionVersioningTests.cs
│ │ │ ├── SublimeTest/
│ │ │ │ ├── SublimeTest/
│ │ │ │ │ ├── MyApp.ux
│ │ │ │ │ ├── MyApp.ux.uno
│ │ │ │ │ ├── SublimeTest.unoproj
│ │ │ │ │ └── fe9b89d9-92a6-4d98-8b6e-f4ae020149bf.dmp
│ │ │ │ └── SublimeTest.unosln
│ │ │ ├── VersionWriterTests.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ └── tray/
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── app.config
│ │ ├── fuse-tray.csproj
│ │ └── packages.config
│ ├── fusion/
│ │ ├── README.md
│ │ ├── core/
│ │ │ ├── Animation.cs
│ │ │ ├── Application.cs
│ │ │ ├── AutoReload/
│ │ │ │ ├── AutoReload.cs
│ │ │ │ └── ControlFactory.cs
│ │ │ ├── BehaviorProperty.cs
│ │ │ ├── Brush.cs
│ │ │ ├── Clipping.cs
│ │ │ ├── Color.cs
│ │ │ ├── Command.cs
│ │ │ ├── ContextMenu.cs
│ │ │ ├── Control.Bind.cs
│ │ │ ├── Control.Empty.cs
│ │ │ ├── Control.Lazy.cs
│ │ │ ├── Control.WithFrame.cs
│ │ │ ├── Control.WithSize.cs
│ │ │ ├── Control.cs
│ │ │ ├── Controls/
│ │ │ │ ├── Button.cs
│ │ │ │ ├── CachedImageBase.cs
│ │ │ │ ├── ColorPicker.cs
│ │ │ │ ├── DropDown.cs
│ │ │ │ ├── IColorMap.cs
│ │ │ │ ├── IImage.cs
│ │ │ │ ├── Image.cs
│ │ │ │ ├── Label.cs
│ │ │ │ ├── LogView.cs
│ │ │ │ ├── MountLocation.cs
│ │ │ │ ├── MultiResolutionImage.cs
│ │ │ │ ├── NativeControl.cs
│ │ │ │ ├── Shapes.cs
│ │ │ │ ├── Slider.cs
│ │ │ │ ├── SvgImage.cs
│ │ │ │ ├── TextBox.cs
│ │ │ │ └── WebView.cs
│ │ │ ├── CornerRadius.cs
│ │ │ ├── Cursor.cs
│ │ │ ├── DebugControl.cs
│ │ │ ├── Diagnostics/
│ │ │ │ └── ConsoleTraceExtensions.cs
│ │ │ ├── Dialogs/
│ │ │ │ ├── FileDialog.cs
│ │ │ │ └── MessageBox.cs
│ │ │ ├── Document.cs
│ │ │ ├── Dragging.cs
│ │ │ ├── DropOperation.cs
│ │ │ ├── Effects.cs
│ │ │ ├── Environments/
│ │ │ │ ├── MacEnvironment.cs
│ │ │ │ └── WindowsEnvironment.cs
│ │ │ ├── Font.cs
│ │ │ ├── FpsProfiler.cs
│ │ │ ├── HotKey.cs
│ │ │ ├── IBehaviorProperty.cs
│ │ │ ├── IDialog.cs
│ │ │ ├── Icon.cs
│ │ │ ├── Key.cs
│ │ │ ├── Keyboard.cs
│ │ │ ├── Layout/
│ │ │ │ ├── Center.cs
│ │ │ │ ├── Collapsable.cs
│ │ │ │ ├── Dock.cs
│ │ │ │ ├── DockBuilder.cs
│ │ │ │ ├── Grid.cs
│ │ │ │ ├── Layer.cs
│ │ │ │ ├── LayoutTracker.cs
│ │ │ │ ├── ObservableMath.cs
│ │ │ │ ├── Scissor.cs
│ │ │ │ ├── Stack.cs
│ │ │ │ ├── Subdivide.cs
│ │ │ │ ├── Switch.cs
│ │ │ │ ├── WithFixedPosition.cs
│ │ │ │ ├── WithPadding.cs
│ │ │ │ ├── WithTransformation.cs
│ │ │ │ └── Wrap.cs
│ │ │ ├── Menus/
│ │ │ │ ├── Menu.cs
│ │ │ │ └── MenuItem.cs
│ │ │ ├── ModifierKeys.cs
│ │ │ ├── ObservableList/
│ │ │ │ ├── IConnectableObservableList.cs
│ │ │ │ ├── IListBehavior.cs
│ │ │ │ ├── IListObserver.cs
│ │ │ │ ├── IListSubject.cs
│ │ │ │ ├── IObservableList.cs
│ │ │ │ ├── ListBehaviorSubject.cs
│ │ │ │ ├── ListChange.cs
│ │ │ │ ├── Operators/
│ │ │ │ │ ├── AggregateAssoc.cs
│ │ │ │ │ ├── Concat.cs
│ │ │ │ │ ├── ConnectWhile.cs
│ │ │ │ │ ├── Count.cs
│ │ │ │ │ ├── Create.cs
│ │ │ │ │ ├── DisposeElements.cs
│ │ │ │ │ ├── Join.cs
│ │ │ │ │ ├── Observable.cs
│ │ │ │ │ ├── RefCount.cs
│ │ │ │ │ ├── Replay.cs
│ │ │ │ │ ├── Select.cs
│ │ │ │ │ ├── SeparateBy.cs
│ │ │ │ │ ├── Switch.cs
│ │ │ │ │ └── Where.cs
│ │ │ │ ├── SumTree.Operations.cs
│ │ │ │ └── SumTree.cs
│ │ │ ├── Outracks.Fusion.Core.csproj
│ │ │ ├── Outracks.Fusion.Core.csproj.DotSettings
│ │ │ ├── Platform/
│ │ │ │ ├── FileFilter.cs
│ │ │ │ ├── IFileDialogs.cs
│ │ │ │ ├── IMessageBox.cs
│ │ │ │ ├── INotifier.cs
│ │ │ │ └── ITrayApplication.cs
│ │ │ ├── Pointer.cs
│ │ │ ├── PoolPerElement.cs
│ │ │ ├── Positioned.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Property/
│ │ │ │ ├── IProperty.cs
│ │ │ │ ├── Operators/
│ │ │ │ │ ├── AutoInvalidate.cs
│ │ │ │ │ ├── ConnectWhile.cs
│ │ │ │ │ ├── Convert.cs
│ │ │ │ │ ├── Deferred.cs
│ │ │ │ │ ├── Distinct.cs
│ │ │ │ │ ├── Or.cs
│ │ │ │ │ ├── PreventFeedback.cs
│ │ │ │ │ ├── Switch.cs
│ │ │ │ │ └── With.cs
│ │ │ │ ├── Sources/
│ │ │ │ │ ├── Constant.cs
│ │ │ │ │ ├── Mutable.cs
│ │ │ │ │ └── Observable.cs
│ │ │ │ ├── SubscriberTrackingObservable.cs
│ │ │ │ └── SubscriberTrackingProperty.cs
│ │ │ ├── PropertyBindingExtensions.cs
│ │ │ ├── Resizable.cs
│ │ │ ├── ScrollBounds.cs
│ │ │ ├── Scrolling.cs
│ │ │ ├── Shell.cs
│ │ │ ├── Stroke.cs
│ │ │ ├── Threading/
│ │ │ │ ├── DispatcherBase.cs
│ │ │ │ ├── DispatcherQueue.cs
│ │ │ │ ├── PollingDispatcher.cs
│ │ │ │ ├── QueuedDispatcher.cs
│ │ │ │ └── SingleThreadDispatcherBase.cs
│ │ │ ├── TogglePropertyCommand.cs
│ │ │ ├── ToolTip.cs
│ │ │ ├── UpdateSubjectCommand.cs
│ │ │ ├── UserSettings/
│ │ │ │ ├── FusionJsonSerializer.cs
│ │ │ │ ├── PersistentProperty.cs
│ │ │ │ ├── PersistentSettings.cs
│ │ │ │ └── UserSettings.cs
│ │ │ ├── ValidatedProperty.cs
│ │ │ ├── Window.cs
│ │ │ └── packages.config
│ │ ├── docs/
│ │ │ ├── GettingStarted.md
│ │ │ └── Reference.md
│ │ ├── integration-tests/
│ │ │ ├── .gitignore
│ │ │ ├── ControlLeakTests.cs
│ │ │ ├── ControlTestExtensions.cs
│ │ │ ├── Info.plist
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Resources/
│ │ │ │ └── DIR
│ │ │ ├── app.config
│ │ │ ├── integration-tests.csproj
│ │ │ └── packages.config
│ │ ├── mac/
│ │ │ ├── AppDelegate.cs
│ │ │ ├── AppDelegate.designer.cs
│ │ │ ├── Application.cs
│ │ │ ├── Controls/
│ │ │ │ ├── ButtonImplementation.cs
│ │ │ │ ├── ColorPickerImplementation.cs
│ │ │ │ ├── ContextMenuImplementation.cs
│ │ │ │ ├── DelegateObserver.cs
│ │ │ │ ├── DropDownImplementation.cs
│ │ │ │ ├── ImageImplementation.cs
│ │ │ │ ├── LabelImplementation.cs
│ │ │ │ ├── LayoutTrackerImplementation.cs
│ │ │ │ ├── LogViewImplementation.cs
│ │ │ │ ├── ScrollingImplementation.cs
│ │ │ │ ├── Shapes/
│ │ │ │ │ ├── CircleImplementation.cs
│ │ │ │ │ ├── LineImplementation.cs
│ │ │ │ │ ├── NSCircle.cs
│ │ │ │ │ ├── NSLine.cs
│ │ │ │ │ ├── NSRectangle.cs
│ │ │ │ │ ├── NSShape.cs
│ │ │ │ │ ├── RectangleImplementation.cs
│ │ │ │ │ └── ShapeControl.cs
│ │ │ │ ├── SliderImplementation.cs
│ │ │ │ ├── TextBoxImplementation.cs
│ │ │ │ └── WebViewImplementation.cs
│ │ │ ├── CursorsImplementation.cs
│ │ │ ├── DataBinding.cs
│ │ │ ├── Dispatcher.cs
│ │ │ ├── DraggingImplementation.cs
│ │ │ ├── EffectsImplementation.cs
│ │ │ ├── FileDialogs.cs
│ │ │ ├── KeyboardImplementation.cs
│ │ │ ├── LayeringImplementation.cs
│ │ │ ├── MacEnvironmentImpl.cs
│ │ │ ├── MainThread.cs
│ │ │ ├── Marshalling.cs
│ │ │ ├── MenuBuilder.cs
│ │ │ ├── MessageBox.cs
│ │ │ ├── MessageBoxImplementation.cs
│ │ │ ├── MonoMacGraphicsContext.cs
│ │ │ ├── MonoMacNotifier.cs
│ │ │ ├── MonoMacTrayApplication.cs
│ │ │ ├── NSDefaultView.cs
│ │ │ ├── ObjCRuntime/
│ │ │ │ └── Messaging.cs
│ │ │ ├── ObservableNSDocument.cs
│ │ │ ├── Outracks.Fusion.Mac.csproj
│ │ │ ├── Outracks.Fusion.Mac.csproj.DotSettings
│ │ │ ├── OverlayImplementation.cs
│ │ │ ├── PermissionOSX.cs
│ │ │ ├── PointerImplementation.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ShellOSX.cs
│ │ │ ├── ToolTipImplementation.cs
│ │ │ ├── Transformation.cs
│ │ │ ├── WindowImplementation.cs
│ │ │ └── packages.config
│ │ ├── tests/
│ │ │ ├── CenterTest.cs
│ │ │ ├── ControlMemoryOverheadTests.cs
│ │ │ ├── CopyTests.cs
│ │ │ ├── DefaultControl.cs
│ │ │ ├── DispatcherBaseTests.cs
│ │ │ ├── DockBuilderTest.cs
│ │ │ ├── DockTest.cs
│ │ │ ├── FileWatchingTest.cs
│ │ │ ├── FrameTest.cs
│ │ │ ├── ImageTests.cs
│ │ │ ├── LazyTest.cs
│ │ │ ├── ListChange.cs
│ │ │ ├── MultiResolutionImageTests.cs
│ │ │ ├── NSObjectTest.cs
│ │ │ ├── ObservableList/
│ │ │ │ ├── ConcatTest.cs
│ │ │ │ ├── CountTest.cs
│ │ │ │ ├── DisposeElementsTest.cs
│ │ │ │ ├── ListBehaviorSubjectTest.cs
│ │ │ │ ├── ReplayTest.cs
│ │ │ │ ├── SeparateByTest.cs
│ │ │ │ ├── SwitchTest.cs
│ │ │ │ └── WhereTest.cs
│ │ │ ├── ObserveOnTest.cs
│ │ │ ├── Outracks.Fusion.Tests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── PropertyBindingExtensionsTests.cs
│ │ │ ├── PropertyTests.cs
│ │ │ ├── ScissorTest.cs
│ │ │ ├── SubdivideTest.cs
│ │ │ ├── SumTree.cs
│ │ │ ├── SvgTests.cs
│ │ │ ├── TestControl.cs
│ │ │ ├── UserSettingsSerializationTest.cs
│ │ │ ├── UserSettingsTest.cs
│ │ │ ├── WithSizeTest.cs
│ │ │ └── packages.config
│ │ └── win/
│ │ ├── Application.cs
│ │ ├── BalloonNotifier.cs
│ │ ├── ContextMenuImplementation.cs
│ │ ├── Controls/
│ │ │ ├── ButtonImplementation.cs
│ │ │ ├── CircleImplementation.cs
│ │ │ ├── ClippingImplementation.cs
│ │ │ ├── ColorPickerImplementation.cs
│ │ │ ├── DropDownImplementation.cs
│ │ │ ├── ImageImplementation.cs
│ │ │ ├── LabelImplementation.cs
│ │ │ ├── LayoutTrackerImplementation.cs
│ │ │ ├── LineImplementation.cs
│ │ │ ├── LogViewImplementation.cs
│ │ │ ├── RectangleImplementation.cs
│ │ │ ├── ShapeControl.cs
│ │ │ ├── SliderImplementation.cs
│ │ │ ├── TextBoxImplementation.cs
│ │ │ ├── WebViewImplementation.cs
│ │ │ └── WindowFromControl.cs
│ │ ├── CursorsImplementation.cs
│ │ ├── CustomTitlebar.cs
│ │ ├── DataBinding.cs
│ │ ├── Dispatcher.cs
│ │ ├── DocumentAppHandler.cs
│ │ ├── DpiAwareForm.cs
│ │ ├── DpiAwareWindow.cs
│ │ ├── DpiAwareness.cs
│ │ ├── DraggingImplementation.cs
│ │ ├── EffectsImplementation.cs
│ │ ├── FancyWindow.xaml
│ │ ├── FancyWindow.xaml.cs
│ │ ├── FileDialogs.cs
│ │ ├── FilterString.cs
│ │ ├── KeyboardImplementation.cs
│ │ ├── Marshalling.cs
│ │ ├── Outracks.Fusion.Windows.csproj
│ │ ├── Outracks.Fusion.Windows.csproj.DotSettings
│ │ ├── OverlayForm.cs
│ │ ├── OverlayImplementation.cs
│ │ ├── OverlayWindow.xaml
│ │ ├── OverlayWindow.xaml.cs
│ │ ├── PermissionWin.cs
│ │ ├── PointerImplementation.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources/
│ │ │ ├── NativeResources.cs
│ │ │ ├── grab.cur
│ │ │ └── grabbing.cur
│ │ ├── ScrollBar.xaml
│ │ ├── ScrollingImplementation.cs
│ │ ├── ShellWin.cs
│ │ ├── StyleResources.xaml
│ │ ├── ToolTipImplementation.cs
│ │ ├── Transformation.cs
│ │ ├── VerticalSynchronization.cs
│ │ ├── WinApi.cs
│ │ ├── WinFormMenuBuilder.cs
│ │ ├── WinFormMenuShortcutExtensions.cs
│ │ ├── WinFormsMessageBox.cs
│ │ ├── WindowImplementation.cs
│ │ ├── WindowPlacement.cs
│ │ ├── WindowWithOverlays.cs
│ │ ├── WindowsMenuBuilder.cs
│ │ ├── WindowsTrayApplication.cs
│ │ ├── WpfCommand.cs
│ │ └── packages.config
│ ├── mac/
│ │ ├── logserver/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ ├── logger.cpp
│ │ │ ├── logger.h
│ │ │ ├── main.cpp
│ │ │ ├── singleproc.cpp
│ │ │ ├── singleproc.h
│ │ │ ├── socketserver.cpp
│ │ │ ├── socketserver.h
│ │ │ ├── test.sh
│ │ │ └── testclient.cpp
│ │ ├── menu-bar/
│ │ │ ├── Assets.xcassets/
│ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Entitlements.plist
│ │ │ ├── Info.plist
│ │ │ ├── Main.cs
│ │ │ ├── MainMenu.xib
│ │ │ ├── Resources/
│ │ │ │ └── Fuse.icns
│ │ │ └── fuse X (menu bar).csproj
│ │ ├── msbuild/
│ │ │ ├── FrameworkList.xml
│ │ │ ├── Xamarin.ImplicitFacade.targets
│ │ │ ├── Xamarin.Mac.AppExtension.CSharp.targets
│ │ │ ├── Xamarin.Mac.AppExtension.Common.props
│ │ │ ├── Xamarin.Mac.AppExtension.Common.targets
│ │ │ ├── Xamarin.Mac.CSharp.targets
│ │ │ ├── Xamarin.Mac.Common.props
│ │ │ ├── Xamarin.Mac.Common.targets
│ │ │ ├── Xamarin.Mac.FSharp.targets
│ │ │ ├── Xamarin.Mac.ObjCBinding.CSharp.props
│ │ │ ├── Xamarin.Mac.ObjCBinding.CSharp.targets
│ │ │ ├── Xamarin.Mac.ObjCBinding.Common.props
│ │ │ ├── Xamarin.Mac.ObjCBinding.Common.targets
│ │ │ ├── Xamarin.Mac.TargetFrameworkFix.targets
│ │ │ ├── Xamarin.Mac.msbuild.targets
│ │ │ ├── Xamarin.Shared.ObjCBinding.targets
│ │ │ ├── Xamarin.Shared.Stubs.targets
│ │ │ ├── Xamarin.Shared.props
│ │ │ └── Xamarin.Shared.targets
│ │ └── studio/
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── Resources/
│ │ │ ├── FuseBigSur.icns
│ │ │ └── Unoproj.icns
│ │ └── fuse X.csproj
│ ├── ninja/
│ │ ├── Outracks.CodeCompletion/
│ │ │ ├── IEngine.cs
│ │ │ ├── IGoToDefinitionFactory.cs
│ │ │ ├── ISuggestionsFactory.cs
│ │ │ ├── Outracks.CodeCompletion.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── SuggestItem.cs
│ │ │ ├── SyntaxLanguage.cs
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.CodeNinja/
│ │ │ ├── AmbientParser/
│ │ │ │ ├── Context.cs
│ │ │ │ ├── ICodeReader.cs
│ │ │ │ ├── IUnoCodeReader.cs
│ │ │ │ ├── Node.cs
│ │ │ │ ├── Parser.ClassBody.cs
│ │ │ │ ├── Parser.Root.cs
│ │ │ │ └── Parser.cs
│ │ │ ├── CodeCompleter/
│ │ │ │ ├── CodeCompleter.DrawStatement.cs
│ │ │ │ ├── CodeCompleter.FunctionBody.cs
│ │ │ │ ├── CodeCompleter.MemberExpression.cs
│ │ │ │ ├── CodeCompleter.PeekHelpers.cs
│ │ │ │ ├── CodeCompleter.QuickWins.New.cs
│ │ │ │ ├── CodeCompleter.QuickWins.cs
│ │ │ │ ├── CodeCompleter.Suggest.cs
│ │ │ │ ├── CodeCompleter.SuggestBlock.cs
│ │ │ │ ├── CodeCompleter.SuggestFiles.cs
│ │ │ │ ├── CodeCompleter.SuggestImportAndApply.cs
│ │ │ │ ├── CodeCompleter.SuggestMembers.cs
│ │ │ │ ├── CodeCompleter.SuggestNodePathTypes.cs
│ │ │ │ ├── CodeCompleter.SuggestOverrides.cs
│ │ │ │ ├── CodeCompleter.SuggestTypes.cs
│ │ │ │ ├── CodeCompleter.SuggestUsing.cs
│ │ │ │ ├── CodeCompleter.TypeBody.cs
│ │ │ │ └── CodeCompleter.cs
│ │ │ ├── CodeNinjaBuild.cs
│ │ │ ├── CodeReader.cs
│ │ │ ├── DocumentationComment.cs
│ │ │ ├── DocumentationHinter/
│ │ │ │ ├── DocumentationCache.cs
│ │ │ │ ├── DocumentationHinter.Helpers.cs
│ │ │ │ └── DocumentationHinter.cs
│ │ │ ├── GoToDefinition.cs
│ │ │ ├── Outracks.CodeCompletion.CodeNinja.csproj
│ │ │ ├── ParameterInfoSuggester.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.CodeNinja.Tests/
│ │ │ ├── CodeReader.cs
│ │ │ ├── DummyEngine.cs
│ │ │ ├── Loggers/
│ │ │ │ ├── ConsoleLogger.cs
│ │ │ │ ├── ILogger.cs
│ │ │ │ └── TeamCityLogger.cs
│ │ │ ├── Outracks.CodeCompletion.CodeNinja.Tests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Test.cs
│ │ │ ├── Tests/
│ │ │ │ ├── Arrays.cs
│ │ │ │ ├── ClassBody.cs
│ │ │ │ ├── ClassBody2.cs
│ │ │ │ ├── ClassBody3.cs
│ │ │ │ ├── ClassBody4.cs
│ │ │ │ ├── ClassBody5.cs
│ │ │ │ ├── ClassBody6.cs
│ │ │ │ ├── ClassBody7.cs
│ │ │ │ ├── ClassBody8.cs
│ │ │ │ ├── Comments.cs
│ │ │ │ ├── CompileErrors.cs
│ │ │ │ ├── Context.cs
│ │ │ │ ├── Delegate.cs
│ │ │ │ ├── DemoTest.cs
│ │ │ │ ├── DrawScope.cs
│ │ │ │ ├── EnumTest.cs
│ │ │ │ ├── Event.cs
│ │ │ │ ├── ExtensionTypeMethod.cs
│ │ │ │ ├── Floats.cs
│ │ │ │ ├── GDC.cs
│ │ │ │ ├── GenericsTest.cs
│ │ │ │ ├── GetSet.cs
│ │ │ │ ├── ImportAndApply.cs
│ │ │ │ ├── Interface.cs
│ │ │ │ ├── Jonny1.cs
│ │ │ │ ├── Keywords.cs
│ │ │ │ ├── KrissTests3.cs
│ │ │ │ ├── KristianTests.cs
│ │ │ │ ├── KristianTests2.cs
│ │ │ │ ├── List.cs
│ │ │ │ ├── Locals.cs
│ │ │ │ ├── MetaProperties.cs
│ │ │ │ ├── MethodBody.cs
│ │ │ │ ├── MethodBody2.cs
│ │ │ │ ├── MethodBody3.cs
│ │ │ │ ├── MethodBody4.cs
│ │ │ │ ├── MethodBody5.cs
│ │ │ │ ├── MethodBody6.cs
│ │ │ │ ├── MethodBody7.cs
│ │ │ │ ├── MethodReturn.cs
│ │ │ │ ├── MethodVariables.cs
│ │ │ │ ├── NewTest.cs
│ │ │ │ ├── NoHintScenarios.cs
│ │ │ │ ├── Numbers.cs
│ │ │ │ ├── Override.cs
│ │ │ │ ├── PrivateMembers.cs
│ │ │ │ ├── StaticMemberAccess.cs
│ │ │ │ ├── SwitchCase.cs
│ │ │ │ ├── SwizzlerTypes.cs
│ │ │ │ ├── TryCatch.cs
│ │ │ │ ├── Using_.cs
│ │ │ │ ├── Using_Static.cs
│ │ │ │ ├── iterator.cs
│ │ │ │ └── loops.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.NRefactoryInterop/
│ │ │ ├── GotoDefinitionFactory.cs
│ │ │ ├── Outracks.CodeCompletion.NRefactoryInterop.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── SuggestionsFactory.cs
│ │ │ ├── UXNinja/
│ │ │ │ ├── Attribute.cs
│ │ │ │ ├── CodeReader.cs
│ │ │ │ ├── Context.cs
│ │ │ │ ├── CreateUXSuggestions.cs
│ │ │ │ ├── ElementContext.cs
│ │ │ │ ├── NRefactoryExtensions.cs
│ │ │ │ └── SourceEntityFactoryUX.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.UXNinja/
│ │ │ ├── ContextType.cs
│ │ │ ├── DataTypeHelper.cs
│ │ │ ├── DataTypes.cs
│ │ │ ├── ElementContextExtensions.cs
│ │ │ ├── EndTagNameSuggestion.cs
│ │ │ ├── IAttributeContext.cs
│ │ │ ├── ICodeReader.cs
│ │ │ ├── IContext.cs
│ │ │ ├── IElementContext.cs
│ │ │ ├── ISuggestion.cs
│ │ │ ├── MemberHelper.cs
│ │ │ ├── Outracks.CodeCompletion.UXNinja.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── PropertyHelper.cs
│ │ │ ├── ResolveUxClasses.cs
│ │ │ ├── StandardAttributesSuggestion.cs
│ │ │ ├── StartTagAttributeNameSuggestion.cs
│ │ │ ├── StartTagAttributeValueSuggestion.cs
│ │ │ ├── StartTagNameSuggestion.cs
│ │ │ ├── SuggestionHelper.cs
│ │ │ ├── SuggestionParser.cs
│ │ │ ├── TokenType.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests/
│ │ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── SomeTest.cs
│ │ │ └── app.config
│ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests.Client/
│ │ │ ├── BasicTypes/
│ │ │ │ ├── CommandLineOptions.cs
│ │ │ │ └── Mono.Options/
│ │ │ │ └── Options.cs
│ │ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests.Client.csproj
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ └── app.config
│ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests.Core/
│ │ │ ├── Attributes/
│ │ │ │ ├── IgnorePerformanceTestAttribute.cs
│ │ │ │ └── PerformanceTestAttribute.cs
│ │ │ ├── Context/
│ │ │ │ ├── IContext.cs
│ │ │ │ └── UxPerformanceTestContext.cs
│ │ │ ├── Loggers/
│ │ │ │ ├── BaseResultLogger.cs
│ │ │ │ ├── IResultLogger.cs
│ │ │ │ ├── LoggersEntities/
│ │ │ │ │ ├── EventEntity.cs
│ │ │ │ │ └── ProjectEntity.cs
│ │ │ │ ├── ResultFileLogger.cs
│ │ │ │ ├── ResultFtpLogger.cs
│ │ │ │ ├── ResultLoggersFactory.cs
│ │ │ │ └── XmlTool.cs
│ │ │ ├── Outracks.CodeCompletion.UXNinja.PerformanceTests.Core.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Runner/
│ │ │ │ ├── PerformanceTestRunner.cs
│ │ │ │ └── RunnerOptions.cs
│ │ │ ├── TestBase.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── Outracks.CodeCompletion.UXNinja.Tests/
│ │ │ ├── Outracks.CodeCompletion.UXNinja.Tests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── TestBase.cs
│ │ │ ├── Tests/
│ │ │ │ ├── StartAttributeName.cs
│ │ │ │ ├── StartTagName.cs
│ │ │ │ └── ValueSuggestion.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ └── Outracks.CodeCompletion.UXNinja.TestsCommon/
│ │ ├── DummyReader.cs
│ │ ├── DummySource.cs
│ │ ├── DummySourcePackage.cs
│ │ ├── Outracks.CodeCompletion.UXNinja.TestsCommon.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── TestData/
│ │ │ ├── App.uno
│ │ │ ├── Attributes.uno
│ │ │ ├── Button.uno
│ │ │ ├── Clicked.uno
│ │ │ ├── Element.uno
│ │ │ ├── Node.uno
│ │ │ ├── Orientation.uno
│ │ │ ├── Outracks.UXNinja.Tests.Library.unoproj
│ │ │ ├── Panel.uno
│ │ │ ├── StackPanel.uno
│ │ │ ├── StaticClass.uno
│ │ │ └── Text.uno
│ │ ├── app.config
│ │ └── packages.config
│ ├── preview/
│ │ ├── app/
│ │ │ ├── Application.uno
│ │ │ ├── Application.ux
│ │ │ ├── Components/
│ │ │ │ ├── ActivityIndicator.ux
│ │ │ │ ├── BasicButton.ux
│ │ │ │ ├── CancelButton.ux
│ │ │ │ ├── ErrorView.ux
│ │ │ │ ├── ManualSetupPageIndicator.ux
│ │ │ │ ├── PageContent.ux
│ │ │ │ └── SegmentedInput.ux
│ │ │ ├── ForeignAccelerometer/
│ │ │ │ ├── Accelerometer.uno
│ │ │ │ ├── AccelerometerImpl.hh
│ │ │ │ ├── AccelerometerImpl.java
│ │ │ │ ├── AccelerometerImpl.mm
│ │ │ │ ├── AccelerometerModule.uno
│ │ │ │ ├── Accelerometer_Android.uno
│ │ │ │ └── Accelerometer_iOS.uno
│ │ │ ├── Fuse.Simulator/
│ │ │ │ ├── BundleManager.uno
│ │ │ │ ├── DeviceInfo.uno
│ │ │ │ ├── DiagnosticsManager.uno
│ │ │ │ ├── Fuse.Simulator.unoproj
│ │ │ │ ├── Logger.uno
│ │ │ │ ├── RecentProjects.uno
│ │ │ │ ├── ScreenSettings.uno
│ │ │ │ ├── ScreenSettings.uxl
│ │ │ │ ├── SimulatorClient.uno
│ │ │ │ ├── SimulatorJS.uno
│ │ │ │ ├── SimulatorManager.uno
│ │ │ │ └── SimulatorView.uno
│ │ │ ├── FuseRx.js
│ │ │ ├── MainView.ux
│ │ │ ├── Pages/
│ │ │ │ ├── AppViewPage.ux
│ │ │ │ ├── CodePage.ux
│ │ │ │ ├── DescriptionPage.ux
│ │ │ │ ├── ErrorPage.ux
│ │ │ │ ├── OpenPage.ux
│ │ │ │ ├── ProjectsPage.ux
│ │ │ │ ├── QRCodePage.ux
│ │ │ │ └── SetupPage.ux
│ │ │ ├── Projects.js
│ │ │ ├── ProxyState.js
│ │ │ ├── Resources.ux
│ │ │ ├── ShakeRecognizer.js
│ │ │ ├── build.sh
│ │ │ ├── fuse-preview.unoproj
│ │ │ └── rx.all.js
│ │ ├── core/
│ │ │ ├── Application.uno
│ │ │ ├── ApplicationStates.uno
│ │ │ ├── Context.uno
│ │ │ ├── DashedBrush.uno
│ │ │ ├── DeveloperMenu.ux
│ │ │ ├── DeveloperMenu.ux.uno
│ │ │ ├── DeviceInfo.uno
│ │ │ ├── Dialogs/
│ │ │ │ ├── LoadingScreen.ux
│ │ │ │ ├── ModalButton.ux
│ │ │ │ └── ModalDialog.ux
│ │ │ ├── EmptyClass.cs
│ │ │ ├── FakeApp.uno
│ │ │ ├── Fuse.Preview.Core.csproj
│ │ │ ├── Fuse.Preview.Core.csproj.DotSettings
│ │ │ ├── Fuse.Preview.Core.unoproj
│ │ │ ├── ModalDialog.uno
│ │ │ ├── ProxyClient.uno
│ │ │ ├── Reflection/
│ │ │ │ ├── DotNetReflection.uno
│ │ │ │ ├── DotNetReflection.uxl
│ │ │ │ ├── NativeReflection.uno
│ │ │ │ ├── ReflectionCache.uno
│ │ │ │ └── ReflectionExtensions.uno
│ │ │ ├── SimulatorClient.uno
│ │ │ ├── UserAppState.uno
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── service/
│ │ │ ├── AndroidPortReverser.cs
│ │ │ ├── ApplicationClassGenerator.cs
│ │ │ ├── AssemblyBuilt.cs
│ │ │ ├── AssetsWatcher.cs
│ │ │ ├── BinaryMessageStreams.cs
│ │ │ ├── BuildCanceledException.cs
│ │ │ ├── BuildIssueDetected.cs
│ │ │ ├── BuildLogged.cs
│ │ │ ├── BuildOutputDirGenerator.cs
│ │ │ ├── BuildProject.cs
│ │ │ ├── Builder.cs
│ │ │ ├── CacheCleaner.cs
│ │ │ ├── CoalesceCache.cs
│ │ │ ├── CodeGenerator.cs
│ │ │ ├── Ended.cs
│ │ │ ├── ErrorListAdapter.cs
│ │ │ ├── FileDataWithMetadata.cs
│ │ │ ├── FileSender.cs
│ │ │ ├── GenerateBytecode.cs
│ │ │ ├── IErrorHelper.cs
│ │ │ ├── IProjectAndServer.cs
│ │ │ ├── InternalBuildError.cs
│ │ │ ├── LogSubject.cs
│ │ │ ├── MarkupErrorLog.cs
│ │ │ ├── MarkupParser.cs
│ │ │ ├── OutputDirGenerator.cs
│ │ │ ├── Platform/
│ │ │ │ ├── BinaryEncoding.cs
│ │ │ │ ├── EnsureSingleInstance.cs
│ │ │ │ ├── Factory.cs
│ │ │ │ ├── IPlatform.cs
│ │ │ │ ├── IProcess.cs
│ │ │ │ ├── Mac.cs
│ │ │ │ ├── MethodCall.cs
│ │ │ │ ├── ProcessArguments.cs
│ │ │ │ ├── ProcessLog.cs
│ │ │ │ └── Windows.cs
│ │ │ ├── PreviewService.cs
│ │ │ ├── PreviewTarget.cs
│ │ │ ├── Program.cs
│ │ │ ├── ProjectBuild.cs
│ │ │ ├── ProjectMarkup.cs
│ │ │ ├── ProjectPreview.cs
│ │ │ ├── ProjectProcess.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Proxy/
│ │ │ │ ├── ProxyProjectEntry.cs
│ │ │ │ ├── ProxyServer.cs
│ │ │ │ └── ProxyServerFailed.cs
│ │ │ ├── RebuildRequired.cs
│ │ │ ├── Reifier.cs
│ │ │ ├── ReifyEventsDaemon.cs
│ │ │ ├── ReifyerLogAdapter.cs
│ │ │ ├── RunFailed.cs
│ │ │ ├── SimulatorBuild.cs
│ │ │ ├── SimulatorHost.cs
│ │ │ ├── SocketServer.cs
│ │ │ ├── SourceToSourceReference.cs
│ │ │ ├── Started.cs
│ │ │ ├── TextWriterAdapter.cs
│ │ │ ├── UnoBuild.cs
│ │ │ ├── UnoBuildWrapper.cs
│ │ │ ├── UpdateAttribute.cs
│ │ │ ├── Updater.cs
│ │ │ ├── app.config
│ │ │ ├── fuse-preview.csproj
│ │ │ ├── fuse-preview.csproj.DotSettings
│ │ │ └── packages.config
│ │ └── tests/
│ │ ├── App.config
│ │ ├── BinaryEncodingTest.cs
│ │ ├── BinaryMessageStreamsTest.cs
│ │ ├── BinaryMessageStreamsTestsUsingPipes.cs
│ │ ├── BinaryMessageStreamsTestsUsingStreams.cs
│ │ ├── CreateOrReuseOutputDir.cs
│ │ ├── Fuse.Preview.Tests.csproj
│ │ ├── MethodCallTest.cs
│ │ ├── ReifyProcessTests.cs
│ │ └── packages.config
│ ├── simulator/
│ │ ├── common/
│ │ │ ├── Bytecode/
│ │ │ │ ├── Exceptions.cs
│ │ │ │ ├── Expression.cs
│ │ │ │ ├── ExpressionIdRegistry.cs
│ │ │ │ ├── Expressions.cs
│ │ │ │ ├── Lambda.cs
│ │ │ │ ├── Literal.cs
│ │ │ │ ├── LiteralIdRegistry.cs
│ │ │ │ ├── Literals.cs
│ │ │ │ ├── MethodGroup.cs
│ │ │ │ ├── NamespaceName.cs
│ │ │ │ ├── Parameter.cs
│ │ │ │ ├── ProjectBytecode.cs
│ │ │ │ ├── ProjectDependency.cs
│ │ │ │ ├── ProjectMetadata.cs
│ │ │ │ ├── Signature.cs
│ │ │ │ ├── Statement.cs
│ │ │ │ ├── StatementIdRegistry.cs
│ │ │ │ ├── Statements.cs
│ │ │ │ ├── StaticMemberName.cs
│ │ │ │ ├── TypeMemberName.cs
│ │ │ │ ├── TypeName.cs
│ │ │ │ ├── TypeNameParser.cs
│ │ │ │ ├── TypeNameTokenizer.cs
│ │ │ │ └── Variable.cs
│ │ │ ├── Common/
│ │ │ │ ├── BinaryMessage.cs
│ │ │ │ ├── CharacterNumber.cs
│ │ │ │ ├── Closure.cs
│ │ │ │ ├── ConcurrentQueue.cs
│ │ │ │ ├── ImmutableList.cs
│ │ │ │ ├── LineNumber.cs
│ │ │ │ ├── MissingStuff.cs
│ │ │ │ ├── Optionals/
│ │ │ │ │ ├── Operators/
│ │ │ │ │ │ ├── Combine.cs
│ │ │ │ │ │ ├── Or.cs
│ │ │ │ │ │ ├── Select.cs
│ │ │ │ │ │ ├── Serialization.cs
│ │ │ │ │ │ └── TryGetValue.cs
│ │ │ │ │ └── Optional.cs
│ │ │ │ ├── SourceReference.cs
│ │ │ │ ├── StringExtensions.cs
│ │ │ │ ├── Tasks.cs
│ │ │ │ ├── TextOffset.cs
│ │ │ │ ├── TextOffsetConversion.cs
│ │ │ │ └── TextPosition.cs
│ │ │ ├── EmptyClass.cs
│ │ │ ├── Messages/
│ │ │ │ ├── BytecodeGenerated.cs
│ │ │ │ ├── BytecodeUpdated.cs
│ │ │ │ ├── DebugLog.cs
│ │ │ │ ├── Diagnostic.cs
│ │ │ │ ├── Error.cs
│ │ │ │ ├── ExceptionInfo.cs
│ │ │ │ ├── RegisterName.cs
│ │ │ │ └── UnhandledException.cs
│ │ │ ├── ObjectIdentifier.cs
│ │ │ ├── Outracks.Simulator.csproj
│ │ │ ├── Outracks.Simulator.csproj.DotSettings
│ │ │ ├── Outracks.Simulator.unoproj
│ │ │ └── Runtime/
│ │ │ ├── ArrayStream.cs
│ │ │ ├── Bundle.cs
│ │ │ ├── FileCache.cs
│ │ │ ├── IReflection.cs
│ │ │ ├── ObjectTagRegistry.cs
│ │ │ ├── Scope.cs
│ │ │ ├── UxFileSource.cs
│ │ │ ├── UxProperty.cs
│ │ │ ├── UxTemplate.cs
│ │ │ ├── VirtualMachine.cs
│ │ │ └── WeakDictionary.cs
│ │ ├── main/
│ │ │ ├── BuildFailed.cs
│ │ │ ├── CodeGeneration/
│ │ │ │ ├── Context.cs
│ │ │ │ ├── Declarations.cs
│ │ │ │ ├── Exceptions.cs
│ │ │ │ ├── FileSources.cs
│ │ │ │ ├── FindNodesInScope.cs
│ │ │ │ ├── GetExpression.cs
│ │ │ │ ├── Initialization.EventBindings.cs
│ │ │ │ ├── Initialization.ListProperties.cs
│ │ │ │ ├── Initialization.SingleProperties.cs
│ │ │ │ ├── Initialization.cs
│ │ │ │ ├── InvalidUXIL.cs
│ │ │ │ ├── Paths.cs
│ │ │ │ ├── ReifyRequired.cs
│ │ │ │ ├── Scopes.cs
│ │ │ │ ├── UxClasses.cs
│ │ │ │ ├── UxFactories.cs
│ │ │ │ └── UxProperties.cs
│ │ │ ├── ExpressionConverter.cs
│ │ │ ├── MetadataGenerator.cs
│ │ │ ├── Outracks.Simulator.Main.csproj
│ │ │ ├── Parser/
│ │ │ │ ├── AccumulatingProgress.cs
│ │ │ │ ├── Caching/
│ │ │ │ │ ├── CachingCompiler.cs
│ │ │ │ │ └── CachingDataType.cs
│ │ │ │ ├── Exceptions.cs
│ │ │ │ ├── Ghosting/
│ │ │ │ │ ├── GhostCompiler.cs
│ │ │ │ │ ├── GhostCompilerFactory.cs
│ │ │ │ │ ├── GhostDataType.cs
│ │ │ │ │ ├── GhostGlobalResource.cs
│ │ │ │ │ ├── GhostProperty.cs
│ │ │ │ │ ├── GlobalResourceNode.cs
│ │ │ │ │ ├── IMemberNode.cs
│ │ │ │ │ ├── OuterClassNode.cs
│ │ │ │ │ ├── PropertyNode.cs
│ │ │ │ │ └── UxXmlExtensions.cs
│ │ │ │ ├── HasErrorsErrorLogWrapper.cs
│ │ │ │ ├── ParsedDocument.cs
│ │ │ │ └── UxParser.cs
│ │ │ ├── ProjectObjectIdentifiers.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Runtime/
│ │ │ │ ├── DotNetBuild.cs
│ │ │ │ ├── DotNetReflection.cs
│ │ │ │ ├── MemoizingTypeMap.cs
│ │ │ │ ├── TypeAliasNameResolver.cs
│ │ │ │ └── TypeMap.cs
│ │ │ ├── UXIL/
│ │ │ │ ├── Marshalling.cs
│ │ │ │ └── MatchWith.cs
│ │ │ ├── UniqueNames.cs
│ │ │ ├── UxFileContents.cs
│ │ │ ├── ValueParser.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ └── tests/
│ │ ├── Bytecode/
│ │ │ ├── TypeNameParseTests.cs
│ │ │ └── TypeNameTests.cs
│ │ ├── CompiledTypeReflectionTests.cs
│ │ ├── Outracks.Simulator.Tests.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── TypeNameTokenizerTests.cs
│ │ ├── UXFeaturesTestApp/
│ │ │ ├── UXAutoBind/
│ │ │ │ └── UXAutoBind.ux
│ │ │ ├── UXBinding/
│ │ │ │ ├── UXBinding.uno
│ │ │ │ └── UXBinding.ux
│ │ │ ├── UXCascade/
│ │ │ │ ├── UXCascade.uno
│ │ │ │ └── UXCascade.ux
│ │ │ ├── UXClass/
│ │ │ │ ├── UXClass.uno
│ │ │ │ └── UXClass.ux
│ │ │ ├── UXConstructor/
│ │ │ │ ├── UXConstructor.uno
│ │ │ │ └── UXConstructor.ux
│ │ │ ├── UXFeaturesTestApp.unoproj
│ │ │ ├── UXGenerateFactory/
│ │ │ │ ├── UXGenerateFactory.uno
│ │ │ │ └── UXGenerateFactory.ux
│ │ │ ├── UXGenerateTemplate/
│ │ │ │ └── UXGenerateTemplate.ux
│ │ │ ├── UXGlobal/
│ │ │ │ ├── UXGlobal.uno
│ │ │ │ └── UXGlobal.ux
│ │ │ ├── UXKey/
│ │ │ │ └── UXKey.ux
│ │ │ ├── UXName/
│ │ │ │ ├── UXName.uno
│ │ │ │ └── UXName.ux
│ │ │ ├── UXResource/
│ │ │ │ ├── UXResource.uno
│ │ │ │ └── UXResource.ux
│ │ │ └── UXValue/
│ │ │ ├── UXValue.uno
│ │ │ └── UXValue.ux
│ │ ├── ValueParserTests.cs
│ │ ├── app.config
│ │ └── packages.config
│ ├── sketch2fuse/
│ │ ├── CHANGELOG.md
│ │ ├── Command/
│ │ │ ├── Command.csproj
│ │ │ ├── Logger.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ └── packages.config
│ │ ├── EndToEndTests/
│ │ │ ├── EndToEnd.cs
│ │ │ ├── EndToEndTests.csproj
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ └── packages.config
│ │ ├── GitVersion.yml
│ │ ├── NuGet.Config
│ │ ├── README.md
│ │ ├── RegressionTests/
│ │ │ ├── ColorPrinter.cs
│ │ │ ├── ColoredDiffPrinter.cs
│ │ │ ├── CommandRunner.cs
│ │ │ ├── DirectoryDiffer.cs
│ │ │ ├── FileDiff.cs
│ │ │ ├── InteractiveDiffAccepter.cs
│ │ │ ├── Log.cs
│ │ │ ├── OutputCleaner.cs
│ │ │ ├── Program.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── RegressionTests.csproj
│ │ │ ├── Result.cs
│ │ │ ├── TeamCityReporter.cs
│ │ │ ├── Test.cs
│ │ │ ├── TestFinder.cs
│ │ │ ├── TestResult.cs
│ │ │ └── packages.config
│ │ ├── RegressionTestsTests/
│ │ │ ├── DirectoryDifferTests.cs
│ │ │ ├── OutputCleanerTests.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── RegressionTestsTests.csproj
│ │ │ └── packages.config
│ │ ├── Sketch2Fuse.sln
│ │ ├── SketchConverter/
│ │ │ ├── API/
│ │ │ │ ├── Factory.cs
│ │ │ │ ├── IConverter.cs
│ │ │ │ └── ILogger.cs
│ │ │ ├── CompatibilityChecker.cs
│ │ │ ├── Converter.cs
│ │ │ ├── Optional.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Result.cs
│ │ │ ├── SketchConverter.csproj
│ │ │ ├── SketchModel/
│ │ │ │ ├── Entities/
│ │ │ │ │ ├── Layers/
│ │ │ │ │ │ ├── SketchArtboard.cs
│ │ │ │ │ │ ├── SketchBitmap.cs
│ │ │ │ │ │ ├── SketchGroup.cs
│ │ │ │ │ │ ├── SketchLayer.cs
│ │ │ │ │ │ ├── SketchRectangle.cs
│ │ │ │ │ │ ├── SketchShapeGroup.cs
│ │ │ │ │ │ ├── SketchShapePath.cs
│ │ │ │ │ │ ├── SketchSymbolInstance.cs
│ │ │ │ │ │ ├── SketchSymbolMaster.cs
│ │ │ │ │ │ └── SketchText.cs
│ │ │ │ │ ├── SketchDocument.cs
│ │ │ │ │ ├── SketchEntity.cs
│ │ │ │ │ └── SketchPage.cs
│ │ │ │ └── Types/
│ │ │ │ ├── ISketchBrush.cs
│ │ │ │ ├── SketchAlignment.cs
│ │ │ │ ├── SketchAttributedString.cs
│ │ │ │ ├── SketchBlur.cs
│ │ │ │ ├── SketchBorder.cs
│ │ │ │ ├── SketchColor.cs
│ │ │ │ ├── SketchCurvePoint.cs
│ │ │ │ ├── SketchFill.cs
│ │ │ │ ├── SketchGradientStop.cs
│ │ │ │ ├── SketchImage.cs
│ │ │ │ ├── SketchLinearGradientBrush.cs
│ │ │ │ ├── SketchPath.cs
│ │ │ │ ├── SketchPoint.cs
│ │ │ │ ├── SketchRect.cs
│ │ │ │ ├── SketchShadow.cs
│ │ │ │ ├── SketchSolidColorBrush.cs
│ │ │ │ ├── SketchStringAttribute.cs
│ │ │ │ └── SketchStyle.cs
│ │ │ ├── SketchParser/
│ │ │ │ ├── AttributedStringParser.cs
│ │ │ │ ├── Exceptions.cs
│ │ │ │ ├── ISketchArchive.cs
│ │ │ │ ├── SketchArchive.cs
│ │ │ │ ├── SketchParser.cs
│ │ │ │ └── SketchParserInternal.cs
│ │ │ ├── Transforms/
│ │ │ │ ├── ITransform.cs
│ │ │ │ └── TextPropertyTransform.cs
│ │ │ ├── UxBuilder/
│ │ │ │ ├── ArtboardUxBuilder.cs
│ │ │ │ ├── AssetEmitter.cs
│ │ │ │ ├── Exceptions.cs
│ │ │ │ ├── Geometry.cs
│ │ │ │ ├── IUxBuilder.cs
│ │ │ │ ├── LayoutBuilder.cs
│ │ │ │ ├── NameValidator.cs
│ │ │ │ ├── SketchCurvePointsToSvg.cs
│ │ │ │ ├── SymbolClassNameBuilder.cs
│ │ │ │ ├── SymbolsUxBuilder.cs
│ │ │ │ ├── UXBuilder.cs
│ │ │ │ ├── UXNode.cs
│ │ │ │ └── UxSize.cs
│ │ │ ├── app.config
│ │ │ └── packages.config
│ │ ├── SketchConverterTests/
│ │ │ ├── AttributedStringParserTests.cs
│ │ │ ├── CompatibilityCheckerTest.cs
│ │ │ ├── ConverterTests.cs
│ │ │ ├── CurvePointUtils.cs
│ │ │ ├── DocumentBuilder.cs
│ │ │ ├── GeometryTests.cs
│ │ │ ├── MessageListLogger.cs
│ │ │ ├── NameValidatorTests.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ResultTests.cs
│ │ │ ├── SketchConverterTests.csproj
│ │ │ ├── SketchParserTests.cs
│ │ │ ├── SketchPathToSvgTests.cs
│ │ │ ├── Snippets.cs
│ │ │ ├── SymbolClassNameBuilderTests.cs
│ │ │ ├── SymbolsUxBuilderTests.cs
│ │ │ ├── Transforms/
│ │ │ │ └── TextPropertyTransformTests.cs
│ │ │ ├── UxBuilderTests.cs
│ │ │ ├── UxNodeTests.cs
│ │ │ ├── UxSizeTests.cs
│ │ │ └── packages.config
│ │ ├── build.bat
│ │ ├── build.sh
│ │ ├── command.sh
│ │ ├── docs/
│ │ │ └── documentation.md
│ │ ├── files/
│ │ │ ├── README.md
│ │ │ ├── Sketch43/
│ │ │ │ ├── AllFillTypes.reference/
│ │ │ │ │ ├── Sketch.FillFlatColor.ux
│ │ │ │ │ ├── Sketch.FillLinearGradient.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── AllFillTypes.sketch
│ │ │ │ ├── AmericanTypewriter.reference/
│ │ │ │ │ ├── Sketch.Text.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── AmericanTypewriter.sketch
│ │ │ │ ├── Arrow.reference/
│ │ │ │ │ ├── Sketch.Arrow.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Arrow.sketch
│ │ │ │ ├── AssymetricPath.reference/
│ │ │ │ │ ├── Sketch.Asymmetric.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── AssymetricPath.sketch
│ │ │ │ ├── Blurs.reference/
│ │ │ │ │ ├── Sketch.BackgroundBlurOval.ux
│ │ │ │ │ ├── Sketch.DisabledBlurRectangle.ux
│ │ │ │ │ ├── Sketch.GaussianBlurRectangle.ux
│ │ │ │ │ ├── Sketch.MotionBlurRectangle.ux
│ │ │ │ │ ├── Sketch.NoBlurRectangle.ux
│ │ │ │ │ ├── Sketch.ZoomBlurRectangle.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Blurs.sketch
│ │ │ │ ├── BooleanOperations.reference/
│ │ │ │ │ ├── Sketch.Difference.ux
│ │ │ │ │ ├── Sketch.Intersection.ux
│ │ │ │ │ ├── Sketch.Subtraction.ux
│ │ │ │ │ ├── Sketch.Union.ux
│ │ │ │ │ ├── Sketch.UnionDifference.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── BooleanOperations.sketch
│ │ │ │ ├── ColoredArialText.reference/
│ │ │ │ │ ├── Sketch.ColoredText.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── ColoredArialText.sketch
│ │ │ │ ├── CombinedShapeSymbol.reference/
│ │ │ │ │ ├── Sketch.CombinedShapeSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── CombinedShapeSymbol.sketch
│ │ │ │ ├── DefaultText.reference/
│ │ │ │ │ ├── Sketch.AutoTextBoxInGroup.ux
│ │ │ │ │ ├── Sketch.AutoTextBoxSymbol.ux
│ │ │ │ │ ├── Sketch.FixedTextBoxInGroup.ux
│ │ │ │ │ ├── Sketch.FixedTextBoxSymbol.ux
│ │ │ │ │ ├── Sketch.NonAsciiSymbol.ux
│ │ │ │ │ ├── Sketch.RichTextSymbol.ux
│ │ │ │ │ ├── Sketch.TextInACircle.ux
│ │ │ │ │ ├── Sketch.TextOnAPath.ux
│ │ │ │ │ ├── Sketch.TextStyleSymbol.ux
│ │ │ │ │ ├── Sketch.TextSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── DefaultText.sketch
│ │ │ │ ├── DisconnectedPath.reference/
│ │ │ │ │ ├── Sketch.Disconnected.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── DisconnectedPath.sketch
│ │ │ │ ├── DuplicatedSymbolName.reference/
│ │ │ │ │ ├── Sketch.DuplicatedSymbolName.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── DuplicatedSymbolName.sketch
│ │ │ │ ├── EditedRectangles.reference/
│ │ │ │ │ ├── Sketch.EditedRectangle.ux
│ │ │ │ │ ├── Sketch.MorphedRectangle.ux
│ │ │ │ │ ├── Sketch.RotatedRectangle.ux
│ │ │ │ │ ├── Sketch.ShearedRectangle.ux
│ │ │ │ │ ├── Sketch.TransformedRectangle.ux
│ │ │ │ │ ├── Sketch.Trapese.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── EditedRectangles.sketch
│ │ │ │ ├── Empty.reference/
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Empty.sketch
│ │ │ │ ├── FlippedAndRotated.reference/
│ │ │ │ │ ├── Sketch.FlippedGroup.ux
│ │ │ │ │ ├── Sketch.FlippedVerticallyPolygon.ux
│ │ │ │ │ ├── Sketch.Rotated30.ux
│ │ │ │ │ ├── Sketch.Rotated30FlippedHorizontally.ux
│ │ │ │ │ ├── Sketch.Rotated30FlippedVertically.ux
│ │ │ │ │ ├── Sketch.Triangle.ux
│ │ │ │ │ ├── Sketch.VerticalFlip.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── FlippedAndRotated.sketch
│ │ │ │ ├── Group.reference/
│ │ │ │ │ ├── Sketch.GroupSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Group.sketch
│ │ │ │ ├── ImageSymbol.reference/
│ │ │ │ │ ├── Sketch.ImageSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── ImageSymbol.sketch
│ │ │ │ ├── InnerShadow.reference/
│ │ │ │ │ ├── Sketch.InnerShadowRectangle.ux
│ │ │ │ │ ├── Sketch.OuterAndInnerShadow.ux
│ │ │ │ │ ├── Sketch.TwoInnerShadows.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── InnerShadow.sketch
│ │ │ │ ├── LayerOpacity.reference/
│ │ │ │ │ ├── Sketch.Rectangles.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── LayerOpacity.sketch
│ │ │ │ ├── Line.reference/
│ │ │ │ │ ├── Sketch.Line.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Line.sketch
│ │ │ │ ├── LineWithoutSymbol.reference/
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── LineWithoutSymbol.sketch
│ │ │ │ ├── MaskedTriangle.reference/
│ │ │ │ │ ├── Sketch.GroupWithMaskSymbol.ux
│ │ │ │ │ ├── Sketch.MaskedTriangle.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── MaskedTriangle.sketch
│ │ │ │ ├── Masks.reference/
│ │ │ │ │ ├── Sketch.AlphaMask.ux
│ │ │ │ │ ├── Sketch.AlphaMaskedRectangle.ux
│ │ │ │ │ ├── Sketch.PentagonMask.ux
│ │ │ │ │ ├── Sketch.RectangleMask.ux
│ │ │ │ │ ├── Sketch.StarMaskedIcon.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Masks.sketch
│ │ │ │ ├── MiscShapePaths.reference/
│ │ │ │ │ ├── Sketch.Circle.ux
│ │ │ │ │ ├── Sketch.GreenArrow.ux
│ │ │ │ │ ├── Sketch.HandDrawnHeart.ux
│ │ │ │ │ ├── Sketch.Oval.ux
│ │ │ │ │ ├── Sketch.PathWithOneRoundedCorner.ux
│ │ │ │ │ ├── Sketch.Polygon.ux
│ │ │ │ │ ├── Sketch.ReallyRectangle.ux
│ │ │ │ │ ├── Sketch.Star.ux
│ │ │ │ │ ├── Sketch.Triangle.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── MiscShapePaths.sketch
│ │ │ │ ├── MultipleStyledText.reference/
│ │ │ │ │ ├── Sketch.RainbowGrowingSize.ux
│ │ │ │ │ ├── Sketch.RainbowGrowingSizeVertical.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── MultipleStyledText.sketch
│ │ │ │ ├── NestedSymbol.reference/
│ │ │ │ │ ├── Sketch.MySymbol.ux
│ │ │ │ │ ├── Sketch.NestedSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── NestedSymbol.sketch
│ │ │ │ ├── OpenFilledPath.reference/
│ │ │ │ │ ├── Sketch.OpenFilled.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── OpenFilledPath.sketch
│ │ │ │ ├── Oval.reference/
│ │ │ │ │ ├── Sketch.Oval.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Oval.sketch
│ │ │ │ ├── Paths.reference/
│ │ │ │ │ ├── Sketch.Curve.ux
│ │ │ │ │ ├── Sketch.EndWithCurve.ux
│ │ │ │ │ ├── Sketch.Mirrored.ux
│ │ │ │ │ ├── Sketch.MirroredCurve.ux
│ │ │ │ │ ├── Sketch.StartWithCurve.ux
│ │ │ │ │ ├── Sketch.Straight.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Paths.sketch
│ │ │ │ ├── Properties.reference/
│ │ │ │ │ ├── Sketch.SomeTexts.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Properties.sketch
│ │ │ │ ├── Rectangle.reference/
│ │ │ │ │ ├── Sketch.Rectangle.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Rectangle.sketch
│ │ │ │ ├── RotatedLayer.reference/
│ │ │ │ │ ├── Sketch.RotatedLayerSymbol.ux
│ │ │ │ │ ├── Sketch.Spiral.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── RotatedLayer.sketch
│ │ │ │ ├── RoundedRectanglesGroup.reference/
│ │ │ │ │ ├── Sketch.RoundedGroup.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── RoundedRectanglesGroup.sketch
│ │ │ │ ├── ScissoredPolygons.reference/
│ │ │ │ │ ├── Sketch.ScissoredPathOneCurve.ux
│ │ │ │ │ ├── Sketch.ScissoredPentagon.ux
│ │ │ │ │ ├── Sketch.ScissoredRectangle.ux
│ │ │ │ │ ├── Sketch.ScissoredTree.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── ScissoredPolygons.sketch
│ │ │ │ ├── ShadowedText.reference/
│ │ │ │ │ ├── Sketch.InnerShadowedText.ux
│ │ │ │ │ ├── Sketch.MultipleShadowedText.ux
│ │ │ │ │ ├── Sketch.ShadowedText.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── ShadowedText.sketch
│ │ │ │ ├── Shadows.reference/
│ │ │ │ │ ├── Sketch.FilledOvalSymbol.ux
│ │ │ │ │ ├── Sketch.RectGrid.ux
│ │ │ │ │ ├── Sketch.RectangleSymbol.ux
│ │ │ │ │ ├── Sketch.RotatedPathSymbol.ux
│ │ │ │ │ ├── Sketch.TriangleSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Shadows.sketch
│ │ │ │ ├── Star.reference/
│ │ │ │ │ ├── Sketch.Star.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── Star.sketch
│ │ │ │ ├── SymbolNames.reference/
│ │ │ │ │ ├── Sketch.DuplicateName.ux
│ │ │ │ │ ├── Sketch.OkSymbol.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── SymbolNames.sketch
│ │ │ │ ├── TestProject.reference/
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── TestProject.sketch
│ │ │ │ ├── VectorPath.reference/
│ │ │ │ │ ├── Sketch.Path.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ ├── VectorPath.sketch
│ │ │ │ ├── desert-moon-zwj-sketch43.reference/
│ │ │ │ │ ├── Sketch.Desert_Moon.ux
│ │ │ │ │ ├── stderr
│ │ │ │ │ └── stdout
│ │ │ │ └── desert-moon-zwj-sketch43.sketch
│ │ │ └── sketch43-file-unpacking.py
│ │ ├── regression-tests.sh
│ │ └── test.sh
│ └── unohost/
│ ├── common/
│ │ ├── Graphics/
│ │ │ ├── FramebufferHandle.cs
│ │ │ ├── FramebufferInfo.cs
│ │ │ ├── RenderbufferHandle.cs
│ │ │ └── TextureHandle.cs
│ │ ├── Input/
│ │ │ ├── Cursor.cs
│ │ │ ├── InputState.cs
│ │ │ ├── ModifierKeys.cs
│ │ │ ├── MouseButton.cs
│ │ │ └── MouseButtons.cs
│ │ ├── Outracks.UnoHost.csproj
│ │ ├── Outracks.UnoHost.csproj.DotSettings
│ │ ├── Platform/
│ │ │ ├── UnoGraphicsContext.cs
│ │ │ └── UnoWindow.cs
│ │ ├── Plugins/
│ │ │ ├── FusionImplementation.cs
│ │ │ └── Plugin.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Protocol/
│ │ │ ├── OpenGLVersionMessage.cs
│ │ │ └── WindowFocusMessage.cs
│ │ ├── UnoHostArgs.cs
│ │ ├── UnoHostControl.cs
│ │ ├── UnoHostProcess.cs
│ │ ├── UnoHostProject.cs
│ │ ├── app.config
│ │ └── packages.config
│ ├── mac/
│ │ ├── AppDelegate.cs
│ │ ├── AppDelegate.designer.cs
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Dispatcher.cs
│ │ ├── DisplayLinkView.cs
│ │ ├── Entitlements.plist
│ │ ├── FusionSupport/
│ │ │ ├── EventIntercepter.cs
│ │ │ ├── Quad.cs
│ │ │ ├── ServerView.cs
│ │ │ ├── ShaderHelper.cs
│ │ │ ├── SurfaceCache.cs
│ │ │ ├── SurfaceCacheItem.cs
│ │ │ ├── TextureInfo.cs
│ │ │ └── UnoHostViewFactory.cs
│ │ ├── Info.plist
│ │ ├── MonoMacEnums.cs
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Protocol/
│ │ │ ├── CocoaEventMessage.cs
│ │ │ ├── NewSurfaceMessage.cs
│ │ │ └── ResizeMessage.cs
│ │ ├── Resources/
│ │ │ └── Icon.icns
│ │ ├── UnoHost.csproj
│ │ ├── UnoHost.csproj.DotSettings
│ │ ├── UnoHostControlImplementation.cs
│ │ ├── UnoView/
│ │ │ ├── EventProcesser.cs
│ │ │ ├── MonoMacEnums.cs
│ │ │ ├── MonoMacGL.Dispose.cs
│ │ │ ├── MonoMacGL.cs
│ │ │ ├── RenderTargets/
│ │ │ │ ├── BackbufferRenderTarget.cs
│ │ │ │ ├── IOSurfaceFramebuffer.cs
│ │ │ │ ├── IOSurfaceObject.cs
│ │ │ │ ├── IOSurfaceRenderTarget.cs
│ │ │ │ ├── IOSurfaceRenderTargetBuffer.cs
│ │ │ │ ├── IOSurfaceTexture.cs
│ │ │ │ └── IRenderTarget.cs
│ │ │ └── UnoView.cs
│ │ ├── app.config
│ │ └── packages.config
│ ├── tests/
│ │ ├── Outracks.UnoHost.Tests.csproj
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Test.cs
│ │ ├── app.config
│ │ └── packages.config
│ └── win/
│ ├── ContextCreationFailed.cs
│ ├── ContextFactory.cs
│ ├── Egl.cs
│ ├── Job.cs
│ ├── OpenTKGL.Dispose.cs
│ ├── OpenTKGL.cs
│ ├── Program.cs
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ ├── Protocol/
│ │ ├── EventMessage.cs
│ │ ├── SetSurfaceMessage.cs
│ │ ├── WindowContextMenuMessage.cs
│ │ ├── WindowCreatedMessage.cs
│ │ ├── WindowKeyBoard.cs
│ │ └── WindowMouseScrollMessage.cs
│ ├── UnoControl.cs
│ ├── UnoHostControlImplementation.cs
│ ├── WinFormsInputState.cs
│ ├── WinFormsMarshalling.cs
│ ├── app.config
│ ├── app.manifest
│ ├── packages.config
│ └── unohost-win.csproj
├── templates/
│ ├── files/
│ │ ├── application-class/
│ │ │ ├── _filename_
│ │ │ └── manifest.xml
│ │ ├── empty-uno-class/
│ │ │ ├── _filename_
│ │ │ └── manifest.xml
│ │ ├── empty-uno-interface/
│ │ │ ├── _filename_
│ │ │ └── manifest.xml
│ │ ├── js/
│ │ │ ├── _filename_
│ │ │ └── manifest.xml
│ │ ├── json/
│ │ │ ├── _filename_
│ │ │ └── manifest.xml
│ │ └── ux/
│ │ ├── _filename_
│ │ └── manifest.xml
│ └── projects/
│ ├── app/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .vscode/
│ │ │ ├── .gitignore
│ │ │ └── settings.json
│ │ ├── MainView.ux
│ │ ├── _filename_.unoproj
│ │ ├── manifest.xml
│ │ ├── package.json
│ │ └── tsconfig.json
│ └── example/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .vscode/
│ │ ├── .gitignore
│ │ └── settings.json
│ ├── Logic.ts
│ ├── MainView.ux
│ ├── _filename_.unoproj
│ ├── manifest.xml
│ ├── package.json
│ └── tsconfig.json
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .appveyor.yml
================================================
version: '{build}'
image: Visual Studio 2019
environment:
nodejs_version: 16
install:
- ps: Install-Product node $env:nodejs_version
- npm install
build_script:
- md src\preview\core\bin\src\preview
- md src\preview\core\bin\src\simulator
- npm run setup:build
after_build:
- ps: |
Push-AppveyorArtifact "fuse-*.exe"
test_script:
- echo TODO npm test
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_style = tab
indent_size = 4
# 4 space indentation
[*.py]
indent_style = space
indent_size = 4
[*.cs]
indent_style = tab
indent_size = 4
insert_final_newline = true
csharp_new_line_before_open_brace = accessors,control_blocks,events,indexers,local_functions,methods,properties,types
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
================================================
FILE: .gitattributes
================================================
# Third-party code
3rdparty/**/* linguist-vendored
setup/nsis/tools/**/* linguist-vendored
# We don't really care about the order of changelog entries
CHANGELOG.md merge=union
# Auto detect text files and perform LF normalization
* text=auto
# Use CRLF line endings for bat files
*.bat crlf
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# Useful for certain integration tests
*.crlf crlf
================================================
FILE: .gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
*.iml
.idea/
# Ignore OS specific and temporary files.
*.swp
*.swo
.DS_Store
Thumbs.db
# Locally installed NuGet packages.
packages/
/RealtimeStudio/Installer/packages/
/RealtimeStudio/Ultimate/packages/
/nuget/
/ /
# Generated files
*.aab
*.apk
*.deb
*.tgz
*.dll
*.dll.config
*.dylib
*.opensdf
*.msi
*.pdb
*.sdf
*.suo
*.uduser
*.user
*.userprefs
*.mdf
*.ldf
.uno/
.Build/
.Cache/
.CodeDruid/
.CodeMage/
.CodeNinja/
ipch/
bin/
obj/
/Offline
/Release
**/build/
Tests/SystemTest
# Sublime files
*.sublime-project
*.sublime-workspace
# WiX objects
*.wixobj
*.wixpdb
/packages-wix.xml
VcRedistLog.txt
#UnoTest generated files
*_actual_render.png
#RS tests generated files
**/GeneratedTestData/*
# Misc
buildlog.txt
OpenTK.GLControl.xml
OpenTK.xml
*.GhostDoc.xml
TMP_DL
#StdLibBuilder
StdLibBuilder.exe*
.LastStdLibBuild
DependencyCache
/Uno/UnoCompiler/Tests/RenderingTests/Newtonsoft.Json.xml
/Uno/UnoCompiler/Tests/RenderingTests/Uno/Audio/NAudio/license.txt
/Uno/UnoCompiler/Tests/RenderingTests/Uno/Audio/NAudio/readme.txt
#Generated packages
Uno/Packages/**/*
# Build
.build-inited
.dotnet-run
# STUFF
.stuff/
*.zip
# unoconfig
!/.unoconfig
build-uno.unoconfig
auto_test_app_uno.pid
# Visual studio 2015+ user specific directory
.vs
tools/mono
src/Fuse/Sandbox/AutoReloadContent.cs
# unpacked Sketch43 test-files
files/output
#NUnit
TestResult.xml
# Node.js
node_modules/
# Installers
*.dmg
*.pkg
*.exe
# Logs
unohost-*.txt
debug.log
================================================
FILE: .npmignore
================================================
README.md
================================================
FILE: .unoconfig
================================================
Fuse.Bin: bin/$(Configuration)
Fuse.Components: components
Fuse.Templates: templates
Fuse.Simulator: src/simulator/main/obj/Fuse.Simulator.dll
if MAC {
Fuse.Exe: bin/$(Configuration)/fuse
Fuse.CodeAssistance: bin/$(Configuration)/fuse-lang
Fuse.LogServer: bin/$(Configuration)/fuse-logserver
Fuse.Studio: "bin/$(Configuration)/fuse X.app"
Fuse.Tray: "bin/$(Configuration)/fuse X (menu bar).app"
Fuse.UnoHost: bin/$(Configuration)/UnoHost.app
} else if WIN32 {
Fuse.Exe: bin/$(Configuration)/fuse.exe
Fuse.CodeAssistance: bin/$(Configuration)/fuse-lang.exe
Fuse.Studio: bin/$(Configuration)/fuse-studio.exe
Fuse.Tray: bin/$(Configuration)/fuse-tray.exe
Fuse.UnoHost: bin/$(Configuration)/unohost.exe
}
Packages.SourcePaths += [
src/simulator
src/preview
]
if WIN32 {
// Global Android Build Tools config (#92).
require `%PROGRAMDATA%\fuse X\.unoconfig`
// We've seen %PROGRAMDATA% being empty on some systems.
require `%SYSTEMDRIVE%\ProgramData\fuse X\.unoconfig`
// Local config should take precedence.
require ~/.unoconfig
}
================================================
FILE: .vscode/.gitignore
================================================
ipch/
================================================
FILE: .vscode/settings.json
================================================
{
"files.associations": {
"*.plist": "xml",
"*.uxl": "xml"
},
"files.exclude": {
"**/.uno": true,
"**/.vs": true,
"**/bin": true,
"**/build": true,
"**/node_modules": true,
"**/packages": true,
"**/obj": true,
"**/*.user": true,
"*.apk": true,
"*.dmg": true,
"*.exe": true,
"*.pkg": true,
"*.tgz": true
}
}
================================================
FILE: 3rdparty/ColorPicker/AlphaDisplay.xaml
================================================
================================================
FILE: 3rdparty/ColorPicker/AlphaDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker
{
///
/// Interaction logic for AlphaDisplay.xaml
///
public partial class AlphaDisplay : UserControl
{
public static Type ClassType
{
get { return typeof(AlphaDisplay); }
}
public event EventHandler> AlphaChanged;
public AlphaDisplay()
{
InitializeComponent();
imgTransparency.Source = mTransparencyBitmap;
}
private WriteableBitmap mTransparencyBitmap = new WriteableBitmap(24, 256, 96, 96, PixelFormats.Bgra32, null);
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var color = (Color)e.NewValue;
var rd = (AlphaDisplay)d;
rd.OnColorChanged(color);
}
private void OnColorChanged(Color color)
{
unsafe
{
mTransparencyBitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)mTransparencyBitmap.BackBuffer;
for (int iRow = 0; iRow < mTransparencyBitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < mTransparencyBitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 4 + 0) = color.B; //Blue
*(pStart + currentPixel * 4 + 1) = color.G; //Green
*(pStart + currentPixel * 4 + 2) = color.R; //red
*(pStart + currentPixel * 4 + 3) = (byte)(255 - iRow); //alpha
}
}
mTransparencyBitmap.AddDirtyRect(new Int32Rect(0, 0, mTransparencyBitmap.PixelWidth, mTransparencyBitmap.PixelHeight));
mTransparencyBitmap.Unlock();
}
}
#endregion
#region Alpha
public static DependencyProperty AlphaProperty = DependencyProperty.Register("Alpha", typeof(byte), ClassType, new PropertyMetadata((byte)255, new PropertyChangedCallback(OnAlphaChanged)));
public byte Alpha
{
get
{
return (byte)GetValue(AlphaProperty);
}
set
{
SetValue(AlphaProperty, value);
}
}
private static void OnAlphaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (AlphaDisplay) d;
display.sAlpha.Value = (byte)e.NewValue/2.55 ;
if (display.AlphaChanged != null)
{
display.AlphaChanged(display,new EventArgs(display.Alpha));
}
}
#endregion
private void sAlpha_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
Alpha = Convert.ToByte( e.NewValue*2.55);
}
private void imgTransparency_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var alphaPercent = 100 * (imgTransparency.ActualHeight - (e.GetPosition((IInputElement)sender)).Y) / imgTransparency.ActualHeight;
sAlpha.Value = alphaPercent;
e.Handled = true;
}
private void imgTransparency_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
if (Mouse.LeftButton == MouseButtonState.Pressed)
{
var alphaPercent = 100 * (imgTransparency.ActualHeight - (e.GetPosition((IInputElement)sender)).Y) / imgTransparency.ActualHeight;
sAlpha.Value = alphaPercent;
}
e.Handled = true;
}
}
}
================================================
FILE: 3rdparty/ColorPicker/CheckerBoardBrush.xaml
================================================
================================================
FILE: 3rdparty/ColorPicker/ColorDisplay.xaml
================================================
================================================
FILE: 3rdparty/ColorPicker/ColorDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace ColorPicker
{
///
/// Interaction logic for ColorDisplay.xaml
///
public partial class ColorDisplay : UserControl
{
public static Type ClassType
{
get { return typeof(ColorDisplay); }
}
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType, new PropertyMetadata(Colors.Gray, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (ColorDisplay)d;
var color = (Color)e.NewValue;
display.OnColorChanged(color);
}
private void OnColorChanged(Color color)
{
colorRect.Background = new SolidColorBrush(color);
}
#endregion
public ColorDisplay()
{
InitializeComponent();
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMY/CMYDisplay.xaml
================================================
C:
M:
Y:
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMY/CMYDisplay.xaml.cs
================================================
using System;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMY
{
///
/// Interaction logic for CMYDisplay.xaml
///
public partial class CMYDisplay : UserControl
{
public enum EDisplayMode
{
ByteDisplay,
PercentNoDecimal
}
private static CMYModel sModel = new CMYModel();
private static Cyan sCyan = new Cyan();
private static Magenta sMagenta = new Magenta();
private static Yellow sYellow = new Yellow();
private Func c;
private Func m;
private Func y;
public CMYDisplay()
{
InitializeComponent();
txtCUnit.Text = "";
txtMUnit.Text = "";
txtYUnit.Text = "";
c = color => sCyan.Value(color).ToString(CultureInfo.InvariantCulture);
m = color => sMagenta.Value(color).ToString(CultureInfo.InvariantCulture);
y = color => sYellow.Value(color).ToString(CultureInfo.InvariantCulture);
CyanFormat = "N0";
MagentaFormat = "N0";
YellowFormat = "N0";
}
public static Type ClassType
{
get { return typeof(CMYDisplay);
}
}
public string CyanFormat { get; set; }
public string MagentaFormat { get; set; }
public string YellowFormat { get; set; }
#region DisplayMode
public static DependencyProperty DisplayModeProperty = DependencyProperty.Register("DisplayMode", typeof(EDisplayMode), ClassType, new PropertyMetadata(EDisplayMode.ByteDisplay, new PropertyChangedCallback(OnDisplayModeChanged)));
public EDisplayMode DisplayMode
{
get
{
return (EDisplayMode)GetValue(DisplayModeProperty);
}
set
{
SetValue(DisplayModeProperty, value);
}
}
private static void OnDisplayModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (CMYDisplay)d;
var displayMode = (EDisplayMode)e.NewValue;
display.OnDisplayModeChanged(displayMode);
}
private void OnDisplayModeChanged(EDisplayMode displayMode)
{
switch (displayMode)
{
case EDisplayMode.ByteDisplay:
txtCUnit.Text = "";
txtMUnit.Text = "";
txtYUnit.Text = "";
c = color => sCyan.Value(color).ToString(CultureInfo.InvariantCulture);
m = color => sMagenta.Value(color).ToString(CultureInfo.InvariantCulture);
y = color => sYellow.Value(color).ToString(CultureInfo.InvariantCulture);
break;
case EDisplayMode.PercentNoDecimal:
txtCUnit.Text = "%";
txtMUnit.Text = "%";
txtYUnit.Text = "%";
c = color => sModel.CComponent(color).PercentageOf(255).ToString(CyanFormat);
m = color => sModel.MComponent(color).PercentageOf(255).ToString(MagentaFormat);
y = color => sModel.YComponent(color).PercentageOf(255).ToString(YellowFormat);
break;
}
}
#endregion
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var color = (Color)e.NewValue;
var display = (CMYDisplay)d;
display.OnColorChanged(color);
}
private void OnColorChanged(Color color)
{
txtC.Text = c(color) ;
txtM.Text = m(color);
txtY.Text = y(color);
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(color));
}
}
#endregion
public event EventHandler> ColorChanged;
private void txtR_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = NumbersOnly(e.Text);
base.OnPreviewTextInput(e);
}
private bool NumbersOnly(string text)
{
String okChars = "0123456789";
return text.ToCharArray().All(c => okChars.IndexOf(c) == -1);
}
private void TextChanged(object sender, TextChangedEventArgs e)
{
try
{
//Color = System.Windows.Media.Color.FromRgb(byte.Parse(txtR.Text), byte.Parse(txtG.Text),
// byte.Parse(txtB.Text));
}
catch
{
}
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMY/CMYModel.cs
================================================
using System;
using System.Windows.Media;
namespace ColorPicker.ColorModels.CMY
{
public class CMYModel
{
public enum ECMYComponent
{
Cyan = 0,
Magenta = 1,
Yellow = 2,
}
#region components
public double CComponent(Color color)
{
return 255 - color.R ;
}
public Double MComponent(Color color)
{
return 255 - color.G ;
}
public Double YComponent(Color color)
{
return 255 - color.B;
}
#endregion
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMY/Cyan.cs
================================================
namespace ColorPicker.ColorModels.CMY
{
class Cyan : ColorComponent
{
public static CMYModel sModel = new CMYModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return (int)sModel.CComponent(color);
}
public override string Name
{
get {return "CMY_Cyan"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMY/Magenta.cs
================================================
namespace ColorPicker.ColorModels.CMY
{
class Magenta : ColorComponent
{
public static CMYModel sModel = new CMYModel();
public override int MinValue
{
get {return 0; }
}
public override int MaxValue
{
get {return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return (int) sModel.MComponent(color);
}
public override string Name
{
get { return "CMY_magenta"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/Black.cs
================================================
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
class Black : ColorComponent
{
public static CMYKModel sModel = new CMYKModel();
public override int MinValue
{
get {return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return sModel.KComponent(color).AsPercent();
}
public override string Name
{
get { return "CMYK_Black"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/CMYKDisplay.xaml
================================================
C:
M:
Y:
K:
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/CMYKDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
///
/// Interaction logic for CMYKDisplay.xaml
///
public partial class CMYKDisplay : UserControl
{
public enum EDisplayMode
{
ByteDisplay,
PercentNoDecimal
}
private bool processEvents = true;
private static CMYKModel sModel = new CMYKModel();
private Func c;
private Func m;
private Func y;
private Func k;
private Color setColor = Colors.Black;
public string CyanFormat { get; set; }
public string MagentaFormat { get; set; }
public string YellowFormat { get; set; }
public string BlackFormat { get; set; }
public CMYKDisplay()
{
InitializeComponent();
c = color => sModel.CComponent(color, KGreedieness).ToString(CyanFormat);
m = color => sModel.MComponent(color, KGreedieness).ToString(MagentaFormat);
y = color => sModel.YComponent(color, KGreedieness).ToString(YellowFormat);
k = color => sModel.KComponent(color, KGreedieness).ToString(BlackFormat);
CyanFormat = "N0";
MagentaFormat = "N0";
YellowFormat = "N0";
BlackFormat = "N0";
}
public static Type ClassType
{
get { return typeof(CMYKDisplay); }
}
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{ var color = (Color) e.NewValue;
var display = (CMYKDisplay) d;
if ((Color)e.NewValue != (Color)e.OldValue && display.setColor != color )
{
display.OnColorChanged(color);
}
}
private void OnColorChanged(Color color)
{
displayComponents(color);
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(color));
}
}
#endregion
#region DisplayMode
private void displayComponents(Color color)
{
processEvents = false;
txtC.Text = c(color);
txtM.Text = m(color);
txtY.Text = y(color);
txtK.Text = k(color);
processEvents =true;
}
public static DependencyProperty DisplayModeProperty = DependencyProperty.Register("DisplayMode", typeof(EDisplayMode), ClassType, new PropertyMetadata(EDisplayMode.ByteDisplay, new PropertyChangedCallback(OnDisplayModeChanged)));
[Category("ColorPicker")]
public EDisplayMode DisplayMode
{
get
{
return (EDisplayMode)GetValue(DisplayModeProperty);
}
set
{
SetValue(DisplayModeProperty, value);
}
}
private static void OnDisplayModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (CMYKDisplay)d;
var displayMode = (EDisplayMode)e.NewValue;
display.OnDisplayModeChanged(displayMode);
}
private void OnDisplayModeChanged(EDisplayMode displayMode)
{
switch (displayMode)
{
case EDisplayMode.ByteDisplay:
txtCUnit.Text = "";
txtMUnit.Text = "";
txtYUnit.Text = "";
txtKUnit.Text = "";
c = color => sModel.CComponent(color, KGreedieness).ToString(CyanFormat);
m = color => sModel.MComponent(color, KGreedieness).ToString(MagentaFormat);
y = color => sModel.YComponent(color, KGreedieness).ToString(YellowFormat);
k = color => sModel.KComponent(color, KGreedieness).ToString(BlackFormat);
break;
case EDisplayMode.PercentNoDecimal:
txtCUnit.Text = "%";
txtMUnit.Text = "%";
txtYUnit.Text = "%";
txtKUnit.Text = "%";
c = color => sModel.CComponent(color, KGreedieness).PercentageOf(255).ToString(CyanFormat);
m = color => sModel.MComponent(color, KGreedieness).PercentageOf(255).ToString(MagentaFormat);
y = color => sModel.YComponent(color, KGreedieness).PercentageOf(255).ToString(YellowFormat);
k = color => sModel.KComponent(color, KGreedieness).PercentageOf(255).ToString(BlackFormat);
break;
}
}
#endregion
#region KGreedieness
public static DependencyProperty KGreedienessProperty = DependencyProperty.Register("KGreedieness", typeof(double), ClassType,
new PropertyMetadata(.7,new PropertyChangedCallback(OnKGreedienessChanged),CoerceKGreedieness));
[Category("ColorPicker")]
public double KGreedieness
{
get
{
return (double)GetValue(KGreedienessProperty);
}
set
{
SetValue(KGreedienessProperty, value);
}
}
private static object CoerceKGreedieness(DependencyObject d, object value)
{
return value;
}
private static void OnKGreedienessChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
}
#endregion
public event EventHandler> ColorChanged;
private void txtR_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = NumbersOnly(e.Text);
base.OnPreviewTextInput(e);
}
private bool NumbersOnly(string text)
{
String okChars = "0123456789";
return text.ToCharArray().All(c => okChars.IndexOf(c) == -1);
}
private void TextChanged(object sender, TextChangedEventArgs e)
{
if (processEvents) {
try
{
setColor = sModel.Color(
double.Parse(txtC.Text, CultureInfo.InvariantCulture),
double.Parse(txtM.Text, CultureInfo.InvariantCulture),
double.Parse(txtY.Text, CultureInfo.InvariantCulture),
double.Parse(txtK.Text, CultureInfo.InvariantCulture));
Color = setColor;
}
catch
{
}
}
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/CMYKModel.cs
================================================
using System;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
public class CMYKModel
{
#region Color
public enum ECMYKComponent
{
Cyan = 0,
Magenta = 1,
Yellow = 2,
Black =3
}
Color Color(double[] components)
{
return Color(components[0], components[1], components[2], components[3]);
}
public Color Color(double cyan, double magenta, double yellow, double black)
{
var red = (255 - cyan - black ).RestrictToByte() ;
var green = (255 - magenta - black).RestrictToByte();
var blue = (255 - yellow - black).RestrictToByte();
return System.Windows.Media.Color.FromRgb( red, green, blue);
}
#endregion
#region components
private double MinComponent(Color color)
{
double c = 255 - color.R;
double m = 255 - color.G ;
double y = 255 - color.B;
return Math.Min(c, Math.Min(m, y));
}
public double CComponent(Color color , Double greedieness)
{
if (greedieness > 1 || greedieness < 0)
{
throw new Exception("Greedieness must be between 0 and 1");
}
var min = MinComponent(color);
return 255 - color.R - min * greedieness ;
}
public double CComponent(Color color)
{
var min = MinComponent(color);
return 255 - color.R - min;
}
public Double MComponent(Color color, Double greedieness)
{
if (greedieness > 1 || greedieness < 0)
{
throw new Exception("Greedieness must be between 0 and 1");
}
var min = MinComponent(color);
return 255 - color.G - min*greedieness;
}
public Double MComponent(Color color)
{
var min = MinComponent(color);
return 255 - color.G - min;
}
public Double YComponent(Color color, Double greedieness)
{
var min = MinComponent(color);
return 255 - color.B - min * greedieness;
}
public Double YComponent(Color color)
{
var min = MinComponent(color);
return 255 - color.B - min;
}
public Double KComponent(Color color, Double greedieness)
{
var min = MinComponent(color);
return min*greedieness;
}
public Double KComponent(Color color)
{
var min = MinComponent(color);
return min;
}
#endregion
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/Cyan.cs
================================================
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
class Cyan : ColorComponent
{
public static CMYKModel sModel = new CMYKModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return sModel.CComponent(color).AsPercent();
}
public override string Name
{
get { return "CMYK_Cyan"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/Magenta.cs
================================================
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
class Magenta : ColorComponent
{
public static CMYKModel sModel = new CMYKModel();
public override int MinValue
{
get {return 0; }
}
public override int MaxValue
{
get {return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return sModel.MComponent(color).AsPercent();
}
public override string Name
{
get { return "CMYK_Magenta"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/CMYK/Yellow.cs
================================================
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.CMYK
{
class Yellow:ColorComponent
{
public static CMYKModel sModel = new CMYKModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return sModel.YComponent(color).AsPercent();
}
public override string Name
{
get { return "CMYK_Yellow"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/ColorComponent.cs
================================================
using System.Windows.Media;
namespace ColorPicker.ColorModels
{
public abstract class ColorComponent
{
//The largest possible value for a component (value when slider at top)
public abstract int MaxValue { get; }
//The smallest possible value for a component (value when slider at bottom)
public abstract int MinValue { get; }
//The value of the component for a given color
public abstract int Value(Color color);
//The name of the color component (used to avoid reflection)
public abstract string Name{ get; }
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/ColorModel.cs
================================================
namespace ColorPicker.ColorModels
{
public abstract class ColorModel
{
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/Brightness.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.HSB
{
class Brightness:NormalComponent
{
private static readonly HSBModel sModel = new HSBModel();
public override int MinValue
{
get {return 0; }
}
public override int MaxValue
{
get {return 100; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double)1 / 256;
double iRowCurrent = 1;
double hue = sModel.HComponent(color);
double saturation = sModel.SComponent(color);
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color hueColor = sModel.Color(hue, saturation, iRowCurrent);
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = hueColor.B; //Blue
*(pStart + currentPixel * 3 + 1) = hueColor.G; //Green
*(pStart + currentPixel * 3 + 2) = hueColor.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)1 / 256;
double iColUnit = (double)360 / 256;
double iRowCurrent = 1;
double r = 0;
double g = 0;
double b = 0;
double brightness = (double)(normalComponentValue)/100;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double iColCurrent = 359;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double hue = iColCurrent;
double saturation = iRowCurrent;
//Taken from HSBModel for speed purposes
if (saturation == 0)
{
r = g = b = brightness;
}
else
{
// the color wheel consists of 6 sectors. Figure out which sector you're in.
double sectorPos = hue / 60.0;
int sectorNumber = (int)(Math.Floor(sectorPos));
// get the fractional part of the sector
double fractionalSector = sectorPos - sectorNumber;
// calculate values for the three axes of the color.
double p = brightness * (1.0 - saturation);
double q = brightness * (1.0 - (saturation * fractionalSector));
double t = brightness * (1.0 - (saturation * (1 - fractionalSector)));
// assign the fractional colors to r, g, and b based on the sector the angle is in.
switch (sectorNumber)
{
case 0:
r = brightness;
g = t;
b = p;
break;
case 1:
r = q;
g = brightness;
b = p;
break;
case 2:
r = p;
g = brightness;
b = t;
break;
case 3:
r = p;
g = q;
b = brightness;
break;
case 4:
r = t;
g = p;
b = brightness;
break;
case 5:
r = brightness;
g = p;
b = q;
break;
}
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte(g * 255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(b * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(r * 255); //red
iColCurrent -= iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var hue = (359 * selectionPoint.X / 255);
var brightness =(double)colorComponentValue/100;
var saturation = (1 - (double)selectionPoint.Y / 255);
return sModel.Color(hue, saturation, brightness);
}
public override Point PointFromColor(Color color)
{
int x = Convert.ToInt32(sModel.HComponent(color) /359 * 255);
int y = 255 - Convert.ToInt32(sModel.SComponent(color) * 255);
return new Point(x, y);
}
public override int Value(Color color)
{
double max = Math.Max(color.R, Math.Max(color.G, color.B));
int b =Convert.ToInt32(max*100/255 ) ;
return b;
}
public override string Name
{
get { return "HSB_Brightness"; }
}
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/HSBModel.cs
================================================
using System;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.HSB
{
public class HSBModel
{
public enum EHSBComponent
{
Hue=0,
Saturation= 1,
Brightness =2
}
Color Color(double[] components)
{
return Color(components[0], components[1], components[2]);
}
public Color Color(double hue, double saturation, double brightness)
{
double r = 0;
double g = 0;
double b = 0;
if (saturation == 0)
{
r = g = b =brightness;
}
else
{
// the color wheel consists of 6 sectors. Figure out which sector you're in.
double sectorPos = hue / 60.0;
int sectorNumber = (int)(Math.Floor(sectorPos));
// get the fractional part of the sector
double fractionalSector = sectorPos - sectorNumber;
// calculate values for the three axes of the color.
double p = brightness * (1.0 - saturation);
double q = brightness * (1.0 - (saturation * fractionalSector));
double t = brightness * (1.0 - (saturation * (1 - fractionalSector)));
// assign the fractional colors to r, g, and b based on the sector the angle is in.
switch (sectorNumber)
{
case 0:
r = brightness;
g = t;
b = p;
break;
case 1:
r = q;
g = brightness;
b = p;
break;
case 2:
r = p;
g = brightness;
b = t;
break;
case 3:
r = p;
g = q;
b = brightness;
break;
case 4:
r = t;
g = p;
b = brightness;
break;
case 5:
r = brightness;
g = p;
b = q;
break;
}
}
return System.Windows.Media.Color.FromRgb(
Convert.ToByte(( r * 255.0)),
Convert.ToByte(( g * 255.0)),
Convert.ToByte(( b * 255.0))
);
}
public double HComponent(Color color)
{
System.Drawing.Color c = System.Drawing.Color.FromArgb(255,color.R,color.G,color.B );
return c.GetHue();
}
public Double SComponent(Color color)
{
return color.SaturationHSB();
}
public Double BComponent(Color color)
{
return color.Brightness();
}
public Double Component(Color color ,int pos)
{
if (pos == 0)
{
return HComponent(color);
}
else if (pos == 1)
{
return SComponent(color);
}
else if (pos == 2)
{
return BComponent(color);
}
else
{
throw new Exception("The HSB model has only 3 components");
}
}
public Double Component(Color color, EHSBComponent component)
{
return Component(color,(int) component );
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/HsbDisplay.xaml
================================================
H:
°
S:
%
B:
%
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/HsbDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace ColorPicker.ColorModels.HSB
{
///
/// Interaction logic for HsbDisplay.xaml
///
public partial class HsbDisplay : UserControl
{
private static HSBModel sModel = new HSBModel();
private static Hue sHue = new Hue();
private static Brightness sBrightness = new Brightness();
private static Saturation sSaturation = new Saturation();
public event EventHandler> ColorComponentChanged;
public static Type ClassType
{
get { return typeof(HsbDisplay); }
}
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var c = (Color)e.NewValue;
var rd = (HsbDisplay)d;
rd.OnColorChanged(c);
}
private void OnColorChanged(Color c)
{
txtH.Text = sHue.Value(c).ToString(CultureInfo.InvariantCulture);
txtS.Text = sSaturation.Value(c).ToString(CultureInfo.InvariantCulture);
txtB.Text = sBrightness.Value(c).ToString(CultureInfo.InvariantCulture);
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(c));
}
}
#endregion
#region NormalComponent
public static DependencyProperty NormalComponentProperty = DependencyProperty.Register("NormalComponent", typeof(NormalComponent), ClassType,
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorComponentChanged));
[Category("ColorPicker")]
public NormalComponent NormalComponent
{
get
{
return (NormalComponent)GetValue(NormalComponentProperty);
}
set
{
SetValue(NormalComponentProperty, value);
}
}
private static void OnColorComponentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var cp = (NormalComponent)e.NewValue;
var rd = (HsbDisplay)d;
rd.OnColorComponentChanged(cp);
}
catch
{
}
}
private void OnColorComponentChanged(NormalComponent colorPlaneColorComponent)
{
if (colorPlaneColorComponent.Name == "HSB_Hue")
{
rH.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "HSB_Saturation")
{
rS.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "HSB_Brightness")
{
rB.IsChecked = true;
}
else
{
rH.IsChecked = false;
rS.IsChecked = false;
rB.IsChecked = false;
}
if (ColorComponentChanged != null)
{
ColorComponentChanged(this, new EventArgs(colorPlaneColorComponent));
}
}
#endregion
public event EventHandler> ColorChanged;
public HsbDisplay()
{
InitializeComponent();
}
private void txtR_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = NumbersOnly(e.Text);
base.OnPreviewTextInput(e);
}
private bool NumbersOnly(string text)
{
String okChars = "0123456789";
return text.ToCharArray().All(c => okChars.IndexOf(c) == -1);
}
private void TextChanged(object sender, TextChangedEventArgs e)
{
if (string.IsNullOrWhiteSpace(txtH.Text) ||
string.IsNullOrWhiteSpace(txtS.Text) ||
string.IsNullOrWhiteSpace(txtB.Text))
{
return;
}
try
{
Color = sModel.Color(
Convert.ToDouble(txtH.Text, CultureInfo.InvariantCulture),
Convert.ToDouble(txtS.Text, CultureInfo.InvariantCulture) / 100,
Convert.ToDouble(txtB.Text, CultureInfo.InvariantCulture) / 100);
}
catch
{
}
}
private void rH_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sHue;
}
private void rS_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sSaturation;
}
private void rB_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sBrightness;
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/Hue.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.HSB
{
class Hue : NormalComponent
{
private static readonly HSBModel sModel = new HSBModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get {return 359; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double)360/256;
double iRowCurrent = 359;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color hueColor = sModel.Color(iRowCurrent, 1, 1);
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = hueColor.B ; //Blue
*(pStart + currentPixel * 3 + 1) = hueColor.G; //Green
*(pStart + currentPixel * 3 + 2) = hueColor.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)1 / 256;
double iColUnit = (double)1 / 256;
double iRowCurrent = 1;
double r = 0;
double g = 0;
double b = 0;
double hue = 359 - normalComponentValue;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double iColCurrent = 0;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double saturation = iColCurrent;
double brightness = iRowCurrent;
//Taken from HSBModel for speed purposes
if (saturation == 0)
{
r = g = b = brightness;
}
else
{
// the color wheel consists of 6 sectors. Figure out which sector you're in.
double sectorPos = hue / 60.0;
int sectorNumber = (int)(Math.Floor(sectorPos));
// get the fractional part of the sector
double fractionalSector = sectorPos - sectorNumber;
// calculate values for the three axes of the color.
double p = brightness * (1.0 - saturation);
double q = brightness * (1.0 - (saturation * fractionalSector));
double t = brightness * (1.0 - (saturation * (1 - fractionalSector)));
// assign the fractional colors to r, g, and b based on the sector the angle is in.
switch (sectorNumber)
{
case 0:
r = brightness;
g = t;
b = p;
break;
case 1:
r = q;
g = brightness;
b = p;
break;
case 2:
r = p;
g = brightness;
b = t;
break;
case 3:
r = p;
g = q;
b = brightness;
break;
case 4:
r = t;
g = p;
b = brightness;
break;
case 5:
r = brightness;
g = p;
b = q;
break;
}
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte( g*255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(b * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(r * 255); //red
iColCurrent += iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
//Original version , however too slow so the hsb calculation was inlined into the function so as to avoid conversion to
//color and back.
//public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
//{
// unsafe
// {
// bitmap.Lock();
// byte* pStart = (byte*)(void*)bitmap.BackBuffer;
// int currentPixel = -1;
// double iRowUnit = (double)1 / 256;
// double iColUnit = (double)1 / 256;
// double iRowCurrent = 1;
// for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
// {
// double iColCurrent = 0;
// for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
// {
// Color hueColor = sModel.Color(normalComponentValue, iColCurrent, iRowCurrent);
// currentPixel++;
// *(pStart + currentPixel * 3 + 0) = hueColor.B; //Blue
// *(pStart + currentPixel * 3 + 1) = hueColor.G; //Green
// *(pStart + currentPixel * 3 + 2) = hueColor.R; //red
// iColCurrent += iColUnit;
// }
// iRowCurrent -= iRowUnit;
// }
// bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
// bitmap.Unlock();
// }
//}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var hue = colorComponentValue;
var brightness = (1 - selectionPoint.Y/255);
var saturation = (selectionPoint.X/255);
return sModel.Color(hue, saturation, brightness);
}
public override Point PointFromColor(Color color)
{
int x = Convert.ToInt32(sModel.SComponent(color) * 255);
int y = 255 - Convert.ToInt32(sModel.BComponent(color) * 255);
return new Point(x,y);
}
public override int Value(Color color)
{
return Convert.ToInt32(sModel.HComponent( color));
}
public override string Name
{
get { return "HSB_Blue"; }
}
public override bool IsNormalIndependantOfColor
{
get { return true; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/Saturation.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.HSB
{
class Saturation:NormalComponent
{
private static readonly HSBModel sModel = new HSBModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double)1 / 256;
double iRowCurrent = 1;
double hue = sModel.HComponent(color);
double brightness = sModel.BComponent(color);
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color hueColor = sModel.Color(hue,iRowCurrent, brightness);
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = hueColor.B; //Blue
*(pStart + currentPixel * 3 + 1) = hueColor.G; //Green
*(pStart + currentPixel * 3 + 2) = hueColor.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)1 / 256;
double iColUnit = (double)360 / 256;
double iRowCurrent = 1;
double r = 0;
double g = 0;
double b = 0;
double saturation = (double)normalComponentValue/ 100;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double iColCurrent = 359;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double hue = iColCurrent;
double brightness = iRowCurrent;
//Taken from HSBModel for speed purposes
if (saturation == 0)
{
r = g = b = brightness;
}
else
{
// the color wheel consists of 6 sectors. Figure out which sector you're in.
double sectorPos = hue / 60.0;
int sectorNumber = (int)(Math.Floor(sectorPos));
// get the fractional part of the sector
double fractionalSector = sectorPos - sectorNumber;
// calculate values for the three axes of the color.
double p = brightness * (1.0 - saturation);
double q = brightness * (1.0 - (saturation * fractionalSector));
double t = brightness * (1.0 - (saturation * (1 - fractionalSector)));
// assign the fractional colors to r, g, and b based on the sector the angle is in.
switch (sectorNumber)
{
case 0:
r = brightness;
g = t;
b = p;
break;
case 1:
r = q;
g = brightness;
b = p;
break;
case 2:
r = p;
g = brightness;
b = t;
break;
case 3:
r = p;
g = q;
b = brightness;
break;
case 4:
r = t;
g = p;
b = brightness;
break;
case 5:
r = brightness;
g = p;
b = q;
break;
}
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte(g * 255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(b * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(r * 255); //red
iColCurrent -= iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var hue = (359 * selectionPoint.X / 255);
var brightness =(1 - selectionPoint.Y / 255);
var saturation = (double) colorComponentValue / 100;
var color = sModel.Color(hue, saturation, brightness);
return color;
}
public override Point PointFromColor(Color color)
{
int x = Convert.ToInt32(sModel.HComponent(color)/359 * 255);
int y = 255 - Convert.ToInt32(sModel.BComponent(color) * 255);
return new Point(x, y);
}
public override int Value(System.Windows.Media.Color color)
{
return Convert.ToInt32((sModel.SComponent(color)) * 100);
}
public override string Name
{
get { return "HSB_Saturation"; }
}
public override bool IsNormalIndependantOfColor
{
get {return false; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/HSB/Yellow.cs
================================================
namespace ColorPicker.ColorModels.CMY
{
class Yellow:ColorComponent
{
public static CMYModel sModel = new CMYModel();
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return (int)sModel.YComponent(color);
}
public override string Name
{
get { return "CMY_Yellow"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/A.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
namespace ColorPicker.ColorModels.Lab
{
public sealed class A : NormalComponent
{
private const double D65X = 0.9505;
private const double D65Y = 1.0;
private const double D65Z = 1.0890;
private static LabModel sModel = new LabModel();
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
public override void UpdateNormalBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double) (MaxValue - MinValue )/bitmap.PixelHeight ;
double iRowCurrent = 100;
double l = sModel.LComponent(color);
double b = sModel.BComponent(color);
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color lightness = sModel.Color(l, iRowCurrent, b);
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = lightness.B; //Blue
*(pStart + currentPixel * 3 + 1) = lightness.G; //Green
*(pStart + currentPixel * 3 + 2) = lightness.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)100/bitmap.PixelHeight ;
var iColUnit = (double)1;
double iRowCurrent = 100;
var a = (double)normalComponentValue;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double l = iRowCurrent;
double iColCurrent = -128;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double theta = 6.0 / 29.0;
double b = iColCurrent;
double fy = (l + 16) / 116.0;
double fx = fy + (a / 500.0);
double fz = fy - (b / 200.0);
var x = (fx > theta) ? D65X * (fx * fx * fx) : (fx - 16.0 / 116.0) * 3 * (theta * theta) * D65X;
var y = (fy > theta) ? D65Y * (fy * fy * fy) : (fy - 16.0 / 116.0) * 3 * (theta * theta) * D65Y;
var z = (fz > theta) ? D65Z * (fz * fz * fz) : (fz - 16.0 / 116.0) * 3 * (theta * theta) * D65Z;
x = (x > 0.9505) ? 0.9505 : ((x < 0) ? 0 : x);
y = (y > 1.0) ? 1.0 : ((y < 0) ? 0 : y);
z = (z > 1.089) ? 1.089 : ((z < 0) ? 0 : z);
double[] Clinear = new double[3];
Clinear[0] = x * 3.2410 - y * 1.5374 - z * 0.4986; // red
Clinear[1] = -x * 0.9692 + y * 1.8760 - z * 0.0416; // green
Clinear[2] = x * 0.0556 - y * 0.2040 + z * 1.0570; // blue
for (int i = 0; i < 3; i++)
{
Clinear[i] = (Clinear[i] <= 0.0031308) ? 12.92 * Clinear[i] : (1 + 0.055) * Math.Pow(Clinear[i], (1.0 / 2.4)) - 0.055;
Clinear[i] = Math.Min(Clinear[i], 1);
Clinear[i] = Math.Max(Clinear[i], 0);
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte(Clinear[2] * 255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(Clinear[1] * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(Clinear[0] * 255); //red
iColCurrent += iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var l = (100 - selectionPoint.Y*100/256);
var a = colorComponentValue;
var b =selectionPoint.X - 128;
return sModel.Color(l, a, b);
}
public override Point PointFromColor(Color color)
{
int x = 128 + Convert.ToInt32(sModel.BComponent(color));
int y = 100 - Convert.ToInt32(sModel.LComponent(color));
return new Point(x, y);
}
public override int MinValue
{
get { return -128; }
}
public override int MaxValue
{
get { return 127; }
}
public override int Value(Color color)
{
return Convert.ToInt32( sModel.AComponent( color ));
}
public override string Name
{
get {return "LAB_A"; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/B.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
namespace ColorPicker.ColorModels.Lab
{
class B : NormalComponent
{
private const double D65X = 0.9505;
private const double D65Y = 1.0;
private const double D65Z = 1.0890;
private static LabModel sModel = new LabModel();
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
public override void UpdateNormalBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, System.Windows.Media.Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double)(MaxValue - MinValue) / bitmap.PixelHeight;
double iRowCurrent = 100;
double l = sModel.LComponent(color);
double a = sModel.AComponent(color);
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color lightness = sModel.Color(l,a, iRowCurrent );
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = lightness.B; //Blue
*(pStart + currentPixel * 3 + 1) = lightness.G; //Green
*(pStart + currentPixel * 3 + 2) = lightness.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)100 / bitmap.PixelHeight;
double iColUnit = (double)1;
double iRowCurrent = 100;
double b = (double)normalComponentValue;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double l = iRowCurrent;
double iColCurrent = -128;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double theta = 6.0 / 29.0;
double a = iColCurrent;
double fy = (l + 16) / 116.0;
double fx = fy + (a / 500.0);
double fz = fy - (b / 200.0);
var x = (fx > theta) ? D65X * (fx * fx * fx) : (fx - 16.0 / 116.0) * 3 * (theta * theta) * D65X;
var y = (fy > theta) ? D65Y * (fy * fy * fy) : (fy - 16.0 / 116.0) * 3 * (theta * theta) * D65Y;
var z = (fz > theta) ? D65Z * (fz * fz * fz) : (fz - 16.0 / 116.0) * 3 * (theta * theta) * D65Z;
x = (x > 0.9505) ? 0.9505 : ((x < 0) ? 0 : x);
y = (y > 1.0) ? 1.0 : ((y < 0) ? 0 : y);
z = (z > 1.089) ? 1.089 : ((z < 0) ? 0 : z);
double[] Clinear = new double[3];
Clinear[0] = x * 3.2410 - y * 1.5374 - z * 0.4986; // red
Clinear[1] = -x * 0.9692 + y * 1.8760 - z * 0.0416; // green
Clinear[2] = x * 0.0556 - y * 0.2040 + z * 1.0570; // blue
for (int i = 0; i < 3; i++)
{
Clinear[i] = (Clinear[i] <= 0.0031308) ? 12.92 * Clinear[i] : (1 + 0.055) * Math.Pow(Clinear[i], (1.0 / 2.4)) - 0.055;
Clinear[i] = Math.Min(Clinear[i], 1);
Clinear[i] = Math.Max(Clinear[i], 0);
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte(Clinear[2] * 255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(Clinear[1] * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(Clinear[0] * 255); //red
iColCurrent += iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var l = (100 - (double)selectionPoint.Y * 100 / 256);
var a = selectionPoint.X - 128;
var b = colorComponentValue;
return sModel.Color(l, a, b);
}
public override Point PointFromColor(Color color)
{
int x = 128 + Convert.ToInt32(sModel.AComponent(color));
int y = 100 - Convert.ToInt32(sModel.LComponent(color));
return new Point(x, y);
}
public override int MinValue
{
get { return -128; }
}
public override int MaxValue
{
get { return 127; }
}
public override string Name
{
get { return "LAB_B"; }
}
public override int Value(Color color)
{
return Convert.ToInt32( sModel.BComponent(color));
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/LabDisplay.xaml
================================================
L:
a:
b:
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/LabDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace ColorPicker.ColorModels.Lab
{
///
/// Interaction logic for LabDisplay.xaml
///
public partial class LabDisplay : UserControl
{
private bool mProcessEvents = true;
private static LabModel sModel = new LabModel();
private static Lightness sLightness = new Lightness();
private static A sA = new A();
private static B sB = new B();
public static Type ClassType
{
get { return typeof(LabDisplay); }
}
public LabDisplay()
{
InitializeComponent();
l = color => sModel.LComponent(color).ToString(LFormat);
a = color => sModel.AComponent(color).ToString(AFormat);
b = color => sModel.BComponent(color).ToString(BFormat);
LFormat = "N0";
AFormat = "N0";
BFormat = "N0";
}
private Func l;
private Func a;
private Func b;
public string LFormat { get; set; }
public string AFormat { get; set; }
public string BFormat { get; set; }
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var color = (Color)e.NewValue;
var display = (LabDisplay)d;
display.OnColorChanged(color);
}
private void OnColorChanged(Color color)
{
mProcessEvents = false;
txtL.Text = l(color);
txtA.Text = a(color);
txtB.Text = b(color);
mProcessEvents = true;
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(color));
}
}
#endregion
public event EventHandler> ColorChanged;
#region NormalComponent
public static DependencyProperty NormalComponentProperty = DependencyProperty.Register("NormalComponent", typeof(NormalComponent), ClassType,
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorComponentChanged));
[Category("ColorPicker")]
public NormalComponent NormalComponent
{
get
{
return (NormalComponent)GetValue(NormalComponentProperty);
}
set
{
SetValue(NormalComponentProperty, value);
}
}
private static void OnColorComponentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var cp = (NormalComponent)e.NewValue;
var rd = (LabDisplay)d;
rd.OnColorComponentChanged(cp);
}
catch
{
}
}
#endregion
private void OnColorComponentChanged(NormalComponent colorPlaneColorComponent)
{
if (colorPlaneColorComponent.Name == "LAB_Lightness")
{
rL.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "LAB_A")
{
rA.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "LAB_B")
{
rB.IsChecked = true;
}
else
{
rL.IsChecked = false;
rA.IsChecked = false;
rB.IsChecked = false;
}
}
private void txtR_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = NumbersOnly(e.Text);
base.OnPreviewTextInput(e);
}
private bool NumbersOnly(string text)
{
String okChars = "0123456789";
return text.ToCharArray().All(c => okChars.IndexOf(c) == -1);
}
private void TextChanged(object sender, TextChangedEventArgs e)
{
if (mProcessEvents)
{
try
{
Color = sModel.Color(
Convert.ToDouble(txtL.Text, CultureInfo.InvariantCulture),
Convert.ToDouble(txtA.Text, CultureInfo.InvariantCulture),
Convert.ToDouble(txtB.Text, CultureInfo.InvariantCulture));
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
}
private void rL_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sLightness;
}
private void rA_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sA;
}
private void rB_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sB;
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/LabModel.cs
================================================
using System;
using System.Windows.Media;
namespace ColorPicker.ColorModels.Lab
{
class LabModel
{
private const double D65X = 0.9505;
private const double D65Y =1.0;
private const double D65Z = 1.0890;
public Color Color (double l, double a , double b)
{
double theta = 6.0/29.0;
double fy = (l+16)/116.0;
double fx = fy + (a/500.0);
double fz = fy - (b/200.0);
var x = (fx > theta) ? D65X*(fx*fx*fx) : (fx - 16.0/116.0)*3*(theta*theta)*D65X;
var y = (fy > theta) ? D65Y*(fy*fy*fy) : (fy - 16.0/116.0)*3*(theta*theta)*D65Y;
var z = (fz > theta)?D65Z * (fz*fz*fz) : (fz - 16.0/116.0)*3*(theta*theta)*D65Z;
x = (x > 0.9505) ? 0.9505 : ((x < 0) ? 0 : x);
y = (y > 1.0) ? 1.0 : ((y < 0) ? 0 : y);
z = (z > 1.089) ? 1.089 : ((z < 0) ? 0 : z);
double[] Clinear = new double[3];
Clinear[0] = x*3.2410 - y*1.5374 - z*0.4986; // red
Clinear[1] = -x*0.9692 + y*1.8760 - z*0.0416; // green
Clinear[2] = x*0.0556 - y*0.2040 + z*1.0570; // blue
for(int i=0; i<3; i++)
{
Clinear[i] = (Clinear[i]<=0.0031308)? 12.92*Clinear[i] : (1+0.055)* Math.Pow(Clinear[i], (1.0/2.4)) - 0.055;
Clinear[i] = Math.Min(Clinear[i], 1);
Clinear[i] = Math.Max(Clinear[i], 0);
}
return System.Windows.Media.Color.FromRgb(
Convert.ToByte(Clinear[0]*255.0),
Convert.ToByte(Clinear[1]*255.0),
Convert.ToByte(Clinear[2]*255.0));
}
public double LComponent(Color color)
{
// normalize red, green, blue values
double rLinear = color.R / 255.0;
double gLinear = color.G / 255.0;
double bLinear = color.B / 255.0;
double r = (rLinear > 0.04045) ? Math.Pow((rLinear + 0.055) / (1 + 0.055), 2.2) : (rLinear / 12.92);
double g = (gLinear > 0.04045) ? Math.Pow((gLinear + 0.055) / (1 + 0.055), 2.2) : (gLinear / 12.92);
double b = (bLinear > 0.04045) ? Math.Pow((bLinear + 0.055) / (1 + 0.055), 2.2) : (bLinear / 12.92);
double CIEY = r * 0.2126 + g * 0.7152 + b * 0.0722;
double l = 116.0 * Fxyz(CIEY / D65Y) - 16;
return l;
}
public double AComponent(Color color)
{
double rLinear = color.R / 255.0;
double gLinear = color.G / 255.0;
double bLinear = color.B / 255.0;
double r = (rLinear > 0.04045) ? Math.Pow((rLinear + 0.055) / (1 + 0.055), 2.2) : (rLinear / 12.92);
double g = (gLinear > 0.04045) ? Math.Pow((gLinear + 0.055) / (1 + 0.055), 2.2) : (gLinear / 12.92);
double b = (bLinear > 0.04045) ? Math.Pow((bLinear + 0.055) / (1 + 0.055), 2.2) : (bLinear / 12.92);
double CIEX = r * 0.4124 + g * 0.3576 + b * 0.1805;
double CIEY = r * 0.2126 + g * 0.7152 + b * 0.0722;
double a = 500.0 * (Fxyz(CIEX / D65X) - Fxyz(CIEY / D65Y));
return a;
}
public double BComponent(Color color)
{
double rLinear = color.R / 255.0;
double gLinear = color.G / 255.0;
double bLinear = color.B / 255.0;
double r = (rLinear > 0.04045) ? Math.Pow((rLinear + 0.055) / (1 + 0.055), 2.2) : (rLinear / 12.92);
double g = (gLinear > 0.04045) ? Math.Pow((gLinear + 0.055) / (1 + 0.055), 2.2) : (gLinear / 12.92);
double b = (bLinear > 0.04045) ? Math.Pow((bLinear + 0.055) / (1 + 0.055), 2.2) : (bLinear / 12.92);
double CIEY = r * 0.2126 + g * 0.7152 + b * 0.0722;
double CIEZ = r * 0.0193 + g * 0.1192 + b * 0.9505;
return 200.0 * (Fxyz(CIEY / D65Y) - Fxyz(CIEZ / D65Z));
}
private static double Fxyz(double t)
{
return ((t > 0.008856)? Math.Pow(t, (1.0/3.0)) : (7.787*t + 16.0/116.0));
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/Lab/Lightness.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
namespace ColorPicker.ColorModels.Lab
{
sealed class Lightness:NormalComponent
{
private static LabModel sModel = new LabModel();
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
public override void UpdateNormalBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, System.Windows.Media.Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
double iRowUnit = (double)100 / 256;
double iRowCurrent = 100;
double a = sModel.AComponent(color);
double b = sModel.BComponent(color);
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
Color lightness = sModel.Color(iRowCurrent, a, b);
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = lightness.B; //Blue
*(pStart + currentPixel * 3 + 1) = lightness.G; //Green
*(pStart + currentPixel * 3 + 2) = lightness.R; //red
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(System.Windows.Media.Imaging.WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
double iRowUnit = (double)1 ;
double iColUnit = (double)1 ;
double iRowCurrent = 127;
double l = (double)normalComponentValue ;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
double b= iRowCurrent;
double iColCurrent = -128;
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
double theta = 6.0 / 29.0;
double a = iColCurrent;
double fy = (l + 16) / 116.0;
double fx = fy + (a / 500.0);
double fz = fy - (b / 200.0);
var x = (fx > theta) ? D65X * (fx * fx * fx) : (fx - 16.0 / 116.0) * 3 * (theta * theta) * D65X;
var y = (fy > theta) ? D65Y * (fy * fy * fy) : (fy - 16.0 / 116.0) * 3 * (theta * theta) * D65Y;
var z = (fz > theta) ? D65Z * (fz * fz * fz) : (fz - 16.0 / 116.0) * 3 * (theta * theta) * D65Z;
x = (x > 0.9505) ? 0.9505 : ((x < 0) ? 0 : x);
y = (y > 1.0) ? 1.0 : ((y < 0) ? 0 : y);
z = (z > 1.089) ? 1.089 : ((z < 0) ? 0 : z);
double[] Clinear = new double[3];
Clinear[0] = x * 3.2410 - y * 1.5374 - z * 0.4986; // red
Clinear[1] = -x * 0.9692 + y * 1.8760 - z * 0.0416; // green
Clinear[2] = x * 0.0556 - y * 0.2040 + z * 1.0570; // blue
for (int i = 0; i < 3; i++)
{
Clinear[i] = (Clinear[i] <= 0.0031308) ? 12.92 * Clinear[i] : (1 + 0.055) * Math.Pow(Clinear[i], (1.0 / 2.4)) - 0.055;
Clinear[i] = Math.Min(Clinear[i], 1);
Clinear[i] = Math.Max(Clinear[i], 0);
}
currentPixel++;
*(pStart + currentPixel * 3 + 0) = Convert.ToByte(Clinear[2] * 255); //Blue
*(pStart + currentPixel * 3 + 1) = Convert.ToByte(Clinear[1] * 255); //Green
*(pStart + currentPixel * 3 + 2) = Convert.ToByte(Clinear[0] * 255); //red
iColCurrent += iColUnit;
}
iRowCurrent -= iRowUnit;
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var l = colorComponentValue;
var b = ( 127 - selectionPoint.Y );
var a = selectionPoint.X -128;
return sModel.Color(l, a, b);
}
public override Point PointFromColor(Color color)
{
int x =128 + Convert.ToInt32(sModel.AComponent(color));
int y = 128 - Convert.ToInt32(sModel.BComponent(color));
return new Point(x, y);
}
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 100; }
}
public override int Value(System.Windows.Media.Color color)
{
return Convert.ToInt32( sModel.LComponent(color));
}
public override string Name
{
get {return "LAB_Lightness"; }
}
private const double D65X = 0.9505;
private const double D65Y = 1.0;
private const double D65Z = 1.0890;
private static double Fxyz(double t)
{
return ((t > 0.008856) ? Math.Pow(t, (1.0 / 3.0)) : (7.787 * t + 16.0 / 116.0));
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/NormalComponent.cs
================================================
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels
{
public abstract class NormalComponent : ColorComponent
{
//Is the Normal bitmap independent of the specific color (false for all but Hue of HSB)
public abstract bool IsNormalIndependantOfColor { get; }
//Updates the normal Bitmap (The bitmap with the slider)
public abstract void UpdateNormalBitmap(WriteableBitmap bitmap, Color color);
//Updates the color plane bitmap (the bitmap where one selects the colors)
public abstract void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue);
//Gets the color corresponding to a selected point (with 255 alpha)
public abstract Color ColorAtPoint(Point selectionPoint,int colorComponentValue);
//Gets the point on the color plane that corresponds to the color (alpha ignored)
public abstract Point PointFromColor(Color color);
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/Blue.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.RGB
{
public class Blue : NormalComponent
{
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 255; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = (byte)(255 - iRow); //Blue
*(pStart + currentPixel * 3 + 1) = color.G; //Green
*(pStart + currentPixel * 3 + 2) = color.R; //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
int currentPixel = -1;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = (byte)normalComponentValue; //Blue
*(pStart + currentPixel * 3 + 1) = (byte)(255 - iRow); //Green
*(pStart + currentPixel * 3 + 2) = (byte)(iCol); //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var blue = (byte)colorComponentValue ;
var green= (byte)Math.Round(255 - selectionPoint.Y);
var red = (byte)Math.Round(selectionPoint.X);
return Color.FromRgb(red, green, blue);
}
public override Point PointFromColor(Color color)
{
return new Point(color.R, 255 - color.G);
}
public override int Value(Color color)
{
return color.B;
}
public override string Name
{
get { return "RGB_Blue"; }
}
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/Green.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.RGB
{
public class Green : NormalComponent
{
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 255; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = color.B; //Blue
*(pStart + currentPixel * 3 + 1) = (byte)(255 - iRow); //Green
*(pStart + currentPixel * 3 + 2) = color.R; //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = (byte)(iCol); //Blue
*(pStart + currentPixel * 3 + 1) = (byte)normalComponentValue; //Green
*(pStart + currentPixel * 3 + 2) = (byte)(255 - iRow); //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var blue = (byte)Math.Round(selectionPoint.X);
var green = (byte)colorComponentValue;
var red = (byte)Math.Round(255 - selectionPoint.Y);
return Color.FromRgb(red, green, blue);
}
public override Point PointFromColor(Color color)
{
return new Point(color.B, 255 - color.R);
}
public override int Value(Color color)
{
return color.G;
}
public override string Name
{
get { return "RGB_Green"; }
}
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/RGBModel.cs
================================================
using System;
using System.Windows.Media;
namespace ColorPicker.ColorModels.RGB
{
class RGBModel:ColorModel
{
public enum EComponents
{
Red,
Green,
Blue
}
public double Distance (Color color1, Color color2)
{
return Math.Sqrt(
Math.Pow(color1.R - color2.R,2) +
Math.Pow(color1.G - color2.G,2) +
Math.Pow(color1.B - color2.B,2)
);
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/Red.cs
================================================
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ColorPicker.ColorModels.RGB
{
public class Red : NormalComponent
{
public override int MinValue
{
get { return 0; }
}
public override int MaxValue
{
get { return 255; }
}
public override void UpdateNormalBitmap(WriteableBitmap bitmap, Color color)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = color.B; //Blue
*(pStart + currentPixel * 3 + 1) = color.G; //Green
*(pStart + currentPixel * 3 + 2) = (byte)(255 - iRow); //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override void UpdateColorPlaneBitmap(WriteableBitmap bitmap, int normalComponentValue)
{
unsafe
{
bitmap.Lock();
int currentPixel = -1;
byte* pStart = (byte*)(void*)bitmap.BackBuffer;
for (int iRow = 0; iRow < bitmap.PixelHeight; iRow++)
{
for (int iCol = 0; iCol < bitmap.PixelWidth; iCol++)
{
currentPixel++;
*(pStart + currentPixel * 3 + 0) = (byte)(iCol); //Blue
*(pStart + currentPixel * 3 + 1) = (byte)(255 - iRow); //Green
*(pStart + currentPixel * 3 + 2) = (byte) normalComponentValue; //red
}
}
bitmap.AddDirtyRect(new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight));
bitmap.Unlock();
}
}
public override Color ColorAtPoint(Point selectionPoint, int colorComponentValue)
{
var blue = (byte)Math.Round(selectionPoint.X);
var green = (byte)Math.Round(255 - selectionPoint.Y);
var red = (byte)colorComponentValue;
return Color.FromRgb(red, green, blue);
}
public override Point PointFromColor(Color color)
{
return new Point(color.B, 255 - color.G);
}
public override int Value(Color color)
{
return color.R;
}
public override string Name
{
get {return "RGB_Red"; }
}
public override bool IsNormalIndependantOfColor
{
get { return false; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/RgbDisplay.xaml
================================================
R:
G:
B:
================================================
FILE: 3rdparty/ColorPicker/ColorModels/RGB/RgbDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker.ColorModels.RGB
{
///
/// Interaction logic for RgbDisplay.xaml
///
public partial class RgbDisplay : UserControl
{
public enum EDisplayMode
{
ByteDisplay,
PercentNoDecimal
}
private bool processEvents = true;
private Func< Color,string> r;
private Func g;
private Func b;
private Func setR;
private Func setG;
private Func setB;
public static Type ClassType
{
get { return typeof (RgbDisplay); }
}
public RgbDisplay()
{
InitializeComponent();
r = c => c.R.ToString(CultureInfo.InvariantCulture);
g = c => c.G.ToString(CultureInfo.InvariantCulture);
b = c => c.B.ToString(CultureInfo.InvariantCulture);
setR = (c, newR) => c.WithR(newR);
setG = (c, newG) => c.WithG(newG);
setB = (c, newB) => c.WithB(newB);
}
private static Red sRed = new Red();
private static Green sGreen = new Green();
private static Blue sBlue = new Blue();
public event EventHandler> ColorChanged;
public event EventHandler> ColorComponentChanged;
#region DisplayMode
public static DependencyProperty DisplayModeProperty = DependencyProperty.Register("DisplayMode", typeof(EDisplayMode), ClassType, new PropertyMetadata(EDisplayMode.ByteDisplay, OnDisplayModeChanged));
[Category("ColorPicker")]
public EDisplayMode DisplayMode
{
get
{
return (EDisplayMode)GetValue(DisplayModeProperty);
}
set
{
SetValue(DisplayModeProperty, value);
}
}
private static void OnDisplayModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (RgbDisplay) d;
var displayMode = (EDisplayMode) e.NewValue;
display.OnDisplayModeChanged(displayMode);
}
private void OnDisplayModeChanged( EDisplayMode displayMode)
{
switch (displayMode)
{
case EDisplayMode.ByteDisplay :
txtRUnit.Text = "";
txtGUnit.Text = "";
txtBUnit.Text = "";
r = c => c.R.ToString(CultureInfo.InvariantCulture);
g = c => c.G.ToString(CultureInfo.InvariantCulture);
b = c => c.B.ToString(CultureInfo.InvariantCulture);
setR = (c, newR) => c.WithR(newR);
setG = (c, newG) => c.WithG(newG);
setB = (c, newB) => c.WithB(newB);
break;
case EDisplayMode.PercentNoDecimal :
txtRUnit.Text = "%";
txtGUnit.Text = "%";
txtBUnit.Text = "%";
r = c => c.R.AsPercent().ToString(CultureInfo.InvariantCulture);
g = c => c.G.AsPercent().ToString(CultureInfo.InvariantCulture);
b = c => c.B.AsPercent().ToString(CultureInfo.InvariantCulture);
setR = (c, newR) => c.WithR(FromPercent(newR));
setG = (c, newG) => c.WithG(FromPercent(newG));
setB = (c, newB) => c.WithB(FromPercent(newB));
break;
}
processEvents = false;
txtR.Text = r(Color);
txtG.Text = g(Color);
txtB.Text = b(Color);
processEvents = true;
}
#endregion
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var c = (Color) e.NewValue;
var rd = (RgbDisplay) d;
rd.OnColorChanged(c);
}
private void OnColorChanged(Color c)
{
processEvents = false;
txtR.Text = r(c);
txtG.Text = g(c);
txtB.Text = b(c);
processEvents = true;
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(c));
}
}
#endregion
#region NormalComponent
public static DependencyProperty NormalComponentProperty = DependencyProperty.Register("NormalComponent", typeof(NormalComponent), ClassType,
new FrameworkPropertyMetadata(sRed, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,OnColorComponentChanged));
[Category("ColorPicker")]
public NormalComponent NormalComponent
{
get
{
return (NormalComponent)GetValue(NormalComponentProperty);
}
set
{
SetValue(NormalComponentProperty, value);
}
}
private static void OnColorComponentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var cp = (NormalComponent)e.NewValue;
var rd = (RgbDisplay) d;
rd.OnColorComponentChanged(cp);
}catch
{
}
}
#endregion
private void OnColorComponentChanged(NormalComponent colorPlaneColorComponent)
{
if (colorPlaneColorComponent.Name == "RGB_Red")
{
rR.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "RGB_Green")
{
rG.IsChecked = true;
}
else if (colorPlaneColorComponent.Name == "RGB_Blue")
{
rB.IsChecked = true;
}
else
{
rR.IsChecked = false;
rG.IsChecked = false;
rB.IsChecked = false;
}
if (ColorComponentChanged != null)
{
ColorComponentChanged(this, new EventArgs(colorPlaneColorComponent));
}
}
private void rR_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sRed;
if (ColorComponentChanged != null)
{
ColorComponentChanged(this, new EventArgs(sRed));
}
}
private void rG_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sGreen;
if (ColorComponentChanged != null)
{
ColorComponentChanged(this, new EventArgs(sGreen));
}
}
private void rB_Checked(object sender, RoutedEventArgs e)
{
NormalComponent = sBlue;
if (ColorComponentChanged != null)
{
ColorComponentChanged(this, new EventArgs(sBlue));
}
}
private void TextChanged(object sender, TextChangedEventArgs e)
{
try
{
if (processEvents)
{
if (sender == txtR)
{
Color = setR(Color, byte.Parse(txtR.Text, CultureInfo.InvariantCulture));
}
else if (sender == txtG)
{
Color = setG(Color, byte.Parse(txtG.Text, CultureInfo.InvariantCulture));
}
else if (sender == txtB)
{
Color = setB(Color, byte.Parse(txtB.Text, CultureInfo.InvariantCulture));
}
//Color = System.Windows.Media.Color.FromRgb(byte.Parse(txtR.Text), byte.Parse(txtG.Text),
// byte.Parse(txtB.Text));
}
}catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
private void txtR_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
if (processEvents)
{
e.Handled = NumbersOnly(e.Text);
base.OnPreviewTextInput(e);
}
}
private bool NumbersOnly(string text)
{
String okChars = "0123456789";
return text.ToCharArray().All(c => okChars.IndexOf(c) == -1);
}
public static byte FromPercent( int percent)
{
return Convert.ToByte((double)percent / 100 * 255);
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ColorPicker.csproj
================================================
Debug
AnyCPU
8.0.30703
2.0
{059DC6C7-59C6-4ADF-8960-976A02E7498E}
library
Properties
ColorPicker
ColorPicker
v4.6
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
true
full
true
bin\Debug\
DEBUG;TRACE
prompt
4
true
pdbonly
true
bin\Release\
TRACE
prompt
4
true
AlphaDisplay.xaml
ColorDisplay.xaml
CMYKDisplay.xaml
CMYDisplay.xaml
HsbDisplay.xaml
LabDisplay.xaml
RgbDisplay.xaml
ColorSelector.xaml
HexDisplay.xaml
NewCurrent.xaml
Code
True
True
Resources.resx
True
Settings.settings
True
ResXFileCodeGenerator
Resources.Designer.cs
SettingsSingleFileGenerator
Settings.Designer.cs
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
MSBuild:Compile
Designer
MSBuild:Compile
Designer
Designer
MSBuild:Compile
MSBuild:Compile
Designer
MSBuild:Compile
Designer
================================================
FILE: 3rdparty/ColorPicker/ColorSelector.xaml
================================================
================================================
FILE: 3rdparty/ColorPicker/ColorSelector.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ColorPicker.ColorModels;
using ColorPicker.ExtensionMethods;
namespace ColorPicker
{
///
/// Interaction logic for ColorSelector.xaml
///
public partial class ColorSelector : UserControl
{
public enum ESelectionRingMode
{
white,
Black,
BlackAndWhite,
BlackOrWhite
}
private enum EColorChangeSource
{
ColorPropertySet,
MouseDown,
SliderMove,
}
public event EventHandler> ColorChanged;
private bool ProcessSliderEvents { get; set; }
private EColorChangeSource mColorChangeSource = EColorChangeSource.ColorPropertySet;
private readonly TranslateTransform selectionTransform = new TranslateTransform();
private readonly WriteableBitmap mSelectionPane = new WriteableBitmap(256, 256, 96, 96, PixelFormats.Bgr24, null);
private readonly WriteableBitmap mNormalPane = new WriteableBitmap(24, 256, 96, 96, PixelFormats.Bgr24, null);
public static Type ClassType
{
get { return typeof(ColorSelector); }
}
public ColorSelector()
{
InitializeComponent();
NormalComponent = new ColorModels.HSB.Hue();
colorPlane.Source = mSelectionPane;
normalColorImage.Source = mNormalPane;
colorPlane.MouseDown += colorPlane_MouseDown;
selectionEllipse.RenderTransform = selectionTransform;
selectionOuterEllipse.RenderTransform = selectionTransform;
ProcessSliderEvents = true;
}
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var c = (Color)e.NewValue;
var oldC = (Color)e.OldValue;
if (c != oldC)
{
var cs = (ColorSelector)d;
cs.OnColorChanged(c);
}
}
private void OnColorChanged(Color color)
{
if (mColorChangeSource == EColorChangeSource.ColorPropertySet)
{
UpdateColorPlaneBitmap(NormalComponent.Value(color));
SelectionPoint = NormalComponent.PointFromColor(color);
selectionTransform.X = SelectionPoint.X - (mSelectionPane.PixelWidth / 2.0);
selectionTransform.Y = SelectionPoint.Y - (mSelectionPane.PixelHeight / 2.0);
sNormal.Value = NormalComponent.Value(color);
if (!NormalComponent.IsNormalIndependantOfColor)
{
NormalComponent.UpdateNormalBitmap(mNormalPane, color);
}
}
if (SelectionRingMode == ESelectionRingMode.BlackOrWhite)
{
AdjustSelectionRing(color);
}
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(color));
}
}
private void AdjustSelectionRing(Color c)
{
if (Color.Brightness() > .6)
{
selectionEllipse.Stroke = new SolidColorBrush(Colors.Black);
}
else
{
selectionEllipse.Stroke = new SolidColorBrush(Colors.White);
};
}
#endregion
#region NormalComponent
public static DependencyProperty NormalComponentProperty = DependencyProperty.Register("NormalComponent", typeof(NormalComponent),
ClassType, new FrameworkPropertyMetadata(new ColorModels.HSB.Hue(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnNormalComponentChanged));
[Category("ColorPicker")]
public NormalComponent NormalComponent
{
get
{
return (NormalComponent)GetValue(NormalComponentProperty);
}
set
{
SetValue(NormalComponentProperty, value);
}
}
private static void OnNormalComponentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var cc = (NormalComponent)e.NewValue;
var cs = (ColorSelector)d;
cs.OnNormalComponentChanged(cc);
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
private void OnNormalComponentChanged(NormalComponent cc)
{
SelectionPoint = cc.PointFromColor(Color);
selectionTransform.X = SelectionPoint.X - (colorPlane.ActualWidth / 2);
selectionTransform.Y = SelectionPoint.Y - (colorPlane.ActualHeight / 2);
ProcessSliderEvents = false;
sNormal.Minimum = cc.MinValue;
sNormal.Maximum = cc.MaxValue;
sNormal.Value = cc.Value(Color);
ProcessSliderEvents = true;
cc.UpdateNormalBitmap(mNormalPane, Color);
cc.UpdateColorPlaneBitmap(mSelectionPane, cc.Value(Color));
}
#endregion
#region SelectionRingMode
public static DependencyProperty SelectionRingModeProperty = DependencyProperty.Register("SelectionRingMode", typeof(ESelectionRingMode), ClassType, new PropertyMetadata(ESelectionRingMode.BlackAndWhite, OnSelectionRingModeChanged));
[Category("ColorPicker")]
public ESelectionRingMode SelectionRingMode
{
get
{
return (ESelectionRingMode)GetValue(SelectionRingModeProperty);
}
set
{
SetValue(SelectionRingModeProperty, value);
}
}
private static void OnSelectionRingModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var colorSelector = (ColorSelector) d;
var selectionRingMode = (ESelectionRingMode) e.NewValue;
colorSelector.OnSelectionRingModeChanged(selectionRingMode);
}
private void OnSelectionRingModeChanged(ESelectionRingMode selectionRingMode)
{
switch (selectionRingMode )
{
case ESelectionRingMode.Black:
selectionEllipse.Stroke = new SolidColorBrush(Colors.Black);
selectionOuterEllipse.Visibility = Visibility.Collapsed;
break;
case ESelectionRingMode.white:
selectionEllipse.Stroke = new SolidColorBrush(Colors.White);
selectionOuterEllipse.Visibility = Visibility.Collapsed;
break;
case ESelectionRingMode.BlackAndWhite:
selectionEllipse.Stroke = new SolidColorBrush(Colors.White);
selectionOuterEllipse.Visibility = Visibility.Visible ;
break;
case ESelectionRingMode.BlackOrWhite:
AdjustSelectionRing(Color);
selectionOuterEllipse.Visibility = Visibility.Collapsed;
break;
}
}
#endregion
#region Event Handlers
void colorPlane_MouseDown(object sender, MouseButtonEventArgs e)
{
mColorChangeSource = EColorChangeSource.MouseDown;
ProcessMousedown(e.GetPosition((IInputElement)sender));
mColorChangeSource = EColorChangeSource.ColorPropertySet;
e.Handled = true;
}
private void ProcessMousedown(Point selectionPoint)
{
SelectionPoint = selectionPoint;
selectionTransform.X = SelectionPoint.X - (colorPlane.ActualWidth / 2);
selectionTransform.Y = SelectionPoint.Y - (colorPlane.ActualHeight / 2);
var newColor = NormalComponent.ColorAtPoint(SelectionPoint, (int)sNormal.Value);
if (!NormalComponent.IsNormalIndependantOfColor)
{
NormalComponent.UpdateNormalBitmap(mNormalPane, newColor);
}
Color = newColor;
}
private void sNormal_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
mColorChangeSource = EColorChangeSource.SliderMove;
if (ProcessSliderEvents)
{
ProcessSliderEvents = false;
Color = NormalComponent.ColorAtPoint(SelectionPoint, (int)e.NewValue);
UpdateColorPlaneBitmap((int)e.NewValue);
ProcessSliderEvents = true;
}
mColorChangeSource = EColorChangeSource.ColorPropertySet;
}
private void colorPlane_MouseMove(object sender, MouseEventArgs e)
{
mColorChangeSource = EColorChangeSource.MouseDown;
if (Mouse.LeftButton == MouseButtonState.Pressed)
{
var point = e.GetPosition((IInputElement)sender);
if (point.X != 256 && point.Y != 256) //Avoids problem that occurs when dragging to edge of colorPane
{
ProcessMousedown(point);
}
}
mColorChangeSource = EColorChangeSource.ColorPropertySet;
e.Handled = true;
}
private void normalColorImage_MouseDown(object sender, MouseButtonEventArgs e)
{
var yPos = (e.GetPosition((IInputElement)sender)).Y;
var proportion = 1 - yPos / 255;
var componentRange = NormalComponent.MaxValue - NormalComponent.MinValue;
var normalValue = NormalComponent.MinValue + proportion * componentRange;
sNormal.Value = normalValue;
e.Handled = true;
}
#endregion
private int lastColorComponentValue = -1;
private string lastComponentName = "";
private void UpdateColorPlaneBitmap(int colorComponentValue)
{
if (lastColorComponentValue != colorComponentValue || lastComponentName != NormalComponent.Name)
{
NormalComponent.UpdateColorPlaneBitmap(mSelectionPane, colorComponentValue);
lastColorComponentValue = colorComponentValue;
lastComponentName = NormalComponent.Name;
}
}
private Point SelectionPoint { get; set; }
public void IncrementNormalSlider()
{
sNormal.Value++;
}
private void normalColorImage_MouseMove(object sender, MouseEventArgs e)
{
if (Mouse.LeftButton == MouseButtonState.Pressed)
{
var yPos = (e.GetPosition((IInputElement)sender)).Y;
var proportion = 1 - yPos / 255;
var componentRange = NormalComponent.MaxValue - NormalComponent.MinValue;
var normalValue = NormalComponent.MinValue + proportion * componentRange;
sNormal.Value = normalValue;
e.Handled = true;
}
}
}
}
================================================
FILE: 3rdparty/ColorPicker/EventArgs.cs
================================================
using System;
namespace ColorPicker
{
public class EventArgs : EventArgs
{
public EventArgs(T value)
{
mValue = value;
}
private readonly T mValue;
public T Value
{
get { return mValue; }
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ExtensionMethods/ByteExtensionMethods.cs
================================================
using System;
namespace ColorPicker.ExtensionMethods
{
public static class ByteExtensionMethods
{
public static int AsPercent(this byte number)
{
return Convert.ToInt32((double)number / 255 * 100);
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ExtensionMethods/ColorExtensionMethods.cs
================================================
using System;
using System.Windows.Media;
namespace ColorPicker.ExtensionMethods
{
public static class ColorExtensionMethods
{
public static double Intensity(this Color color)
{
return (double)(color.R + color.G + color.B ) /( 3 * 255);
}
public static double Brightness(this Color color)
{
return (double)Math.Max(Math.Max(color.R, color.G), color.B) / 255;
}
public static double SaturationHSB(this Color color)
{
var max = (double)Math.Max(Math.Max(color.R, color.G), color.B) / 255;
if (max == 0) return 0;
var min = (double)Math.Min(Math.Min(color.R, color.G), color.B) / 255;
return (max - min)/max;
}
public static double Lightness(this Color color)
{
var max = (double)Math.Max(Math.Max(color.R, color.G), color.B) / 255;
var min = (double)Math.Min(Math.Min(color.R, color.G), color.B) / 255;
return (max + min)/2;
}
public static double Chroma(this Color color)
{
var max = (double)Math.Max(Math.Max(color.R, color.G), color.B) / 255;
var min = (double)Math.Min(Math.Min(color.R, color.G), color.B) / 255;
return max - min;
}
public static double SaturationHSL(this Color color)
{
var max = (double)Math.Max(Math.Max(color.R, color.G), color.B) / 255;
var min = (double)Math.Min(Math.Min(color.R, color.G), color.B) / 255;
var chroma = max - min;
var lightness = (max + min)/2;
if (lightness <= .5)
{
return chroma/(2*lightness);
}
return chroma / (2 - 2 * lightness);
}
public static Color WithAlpha(this Color color, byte alpha)
{
return Color.FromArgb(alpha, color.R, color.G, color.B);
}
public static Color WithR(this Color color, byte r)
{
return Color.FromArgb(color.A , r, color.G, color.B);
}
public static Color WithG(this Color color, byte g)
{
return Color.FromArgb(color.A, color.R,g, color.B);
}
public static Color WithB(this Color color, byte b)
{
return Color.FromArgb(color.A, color.R, color.G, b);
}
}
}
================================================
FILE: 3rdparty/ColorPicker/ExtensionMethods/DoubleExtensionMethods.cs
================================================
using System;
namespace ColorPicker.ExtensionMethods
{
public static class DoubleExtensionMethods
{
public static int AsPercent (this double number)
{
return Convert.ToInt32(number*100);
}
public static double PercentageOf(this double number , double value)
{
return (number/value)*100;
}
public static double RestrictToRange(this double number , double min, double max)
{
return Math.Min(Math.Max(number, min), max);
}
public static byte RestrictToByte(this double number)
{
return Convert.ToByte(number.RestrictToRange(0,255));
}
}
}
================================================
FILE: 3rdparty/ColorPicker/HexDisplay.xaml
================================================
#
================================================
FILE: 3rdparty/ColorPicker/HexDisplay.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace ColorPicker
{
///
/// Interaction logic for HexDisplay.xaml
///
public partial class HexDisplay : UserControl
{
public enum EAlphaByteVisibility
{
visible,
hidden,
auto //show if Alpha byte not ff
}
public static Type ClassType
{
get { return typeof(HexDisplay); }
}
public event EventHandler> ColorChanged;
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnColorChanged));
[ Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var c = (Color)e.NewValue;
var rd = (HexDisplay)d;
rd.OnColorChanged(c);
}
private void OnColorChanged(Color c)
{
string colorText = "";
if (IsNumberSignIncludedInText)
{
colorText="#";
}
switch (AlphaByteVisibility )
{
case EAlphaByteVisibility.visible:
colorText += c.ToString().Substring(1);
break;
case EAlphaByteVisibility.hidden :
colorText += c.ToString().Substring(3);
break;
case EAlphaByteVisibility.auto :
break;
}
txtHex.Text = colorText;
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(c));
}
}
#endregion
#region Text
public static DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), ClassType, new PropertyMetadata("", new PropertyChangedCallback(OnTextChanged)));
public string Text
{
get
{
return (string)GetValue(TextProperty);
}
set
{
SetValue(TextProperty, value);
}
}
private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var display = (HexDisplay) d;
var oldtext = (string) e.OldValue;
var newText = (String) e.NewValue;
}
#endregion
#region IsNumberSignIncludedInText
public static DependencyProperty IsNumberSignIncludedInTextProperty = DependencyProperty.Register("IsNumberSignIncludedInText", typeof(bool), ClassType,
new PropertyMetadata(false, OnIsNumberSignIncludedInTextChanged));
[Category("ColorPicker")]
public bool IsNumberSignIncludedInText
{
get
{
return (bool)GetValue(IsNumberSignIncludedInTextProperty);
}
set
{
SetValue(IsNumberSignIncludedInTextProperty, value);
}
}
private static void OnIsNumberSignIncludedInTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
}
#endregion
#region AlphaByteVisibility
public static DependencyProperty AlphaByteVisibilityProperty = DependencyProperty.Register("AlphaByteVisibility", typeof(EAlphaByteVisibility), ClassType,
new PropertyMetadata(EAlphaByteVisibility.hidden, OnAlphaByteVisibilityChanged));
[Category("ColorPicker")]
public EAlphaByteVisibility AlphaByteVisibility
{
get
{
return (EAlphaByteVisibility)GetValue(AlphaByteVisibilityProperty);
}
set
{
SetValue(AlphaByteVisibilityProperty, value);
}
}
private static void OnAlphaByteVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
}
#endregion
public HexDisplay()
{
InitializeComponent();
}
}
}
================================================
FILE: 3rdparty/ColorPicker/NewCurrent.xaml
================================================
new
================================================
FILE: 3rdparty/ColorPicker/NewCurrent.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
namespace ColorPicker
{
///
/// Interaction logic for NewCurrent.xaml
///
public partial class NewCurrent : UserControl
{
public static Type ClassType
{
get { return typeof(NewCurrent); }
}
public NewCurrent()
{
InitializeComponent();
}
#region NewColor
public static DependencyProperty NewColorProperty = DependencyProperty.Register("NewColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Gray, new PropertyChangedCallback(OnNewColorChanged)));
[Category("ColorPicker")]
public Color NewColor
{
get
{
return (Color)GetValue(NewColorProperty);
}
set
{
SetValue(NewColorProperty, value);
}
}
private static void OnNewColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var nc = (NewCurrent)d;
nc.rNew.Fill = new SolidColorBrush(((Color)e.NewValue).WithAlpha(nc.Alpha));
}
#endregion
#region CurrentColor
public static DependencyProperty CurrentColorProperty = DependencyProperty.Register("CurrentColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Black, new PropertyChangedCallback(OnCurrentColorChanged)));
///
/// The color being selected
///
[Category("ColorPicker")]
public Color CurrentColor
{
get
{
return (Color)GetValue(CurrentColorProperty);
}
set
{
SetValue(CurrentColorProperty, value);
}
}
private static void OnCurrentColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
//Ignore
}
#endregion
#region Alpha
public static DependencyProperty AlphaProperty = DependencyProperty.Register("Alpha", typeof(byte), ClassType, new PropertyMetadata((byte)255, new PropertyChangedCallback(OnAlphaChanged)));
///
/// The Alpha Component of the currrent color
///
[Category("ColorPicker")]
public byte Alpha
{
get
{
return (byte)GetValue(AlphaProperty);
}
set
{
SetValue(AlphaProperty, value);
}
}
private static void OnAlphaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var nc = (NewCurrent)d;
nc.rNew.Fill = new SolidColorBrush(nc.NewColor.WithAlpha(Convert.ToByte(e.NewValue)));
}
#endregion
//public bool ShowLabels { get; set; }
}
}
================================================
FILE: 3rdparty/ColorPicker/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ColorPicker")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("ColorPicker")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
//inside a . For example, if you are using US english
//in your source files, set the to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ColorPickerTests")]
================================================
FILE: 3rdparty/ColorPicker/Properties/Resources.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace ColorPicker.Properties {
using System;
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ColorPicker.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
================================================
FILE: 3rdparty/ColorPicker/Properties/Resources.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: 3rdparty/ColorPicker/Properties/Settings.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace ColorPicker.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
================================================
FILE: 3rdparty/ColorPicker/Properties/Settings.settings
================================================
================================================
FILE: 3rdparty/ColorPicker/SliderResources.xaml
================================================
M 5,-9 A 1.5 1.5 0 0 0 3.5,-10.5 L -3.5,-10.5 A 1.5 1.5 0 0 0 -5,-9 L -5,9 A 1.5 1.5 0 0 0 -3.5,10.5 L 3.5,10.5 A 1.5 1.5 0 0 0 5,9 Z
M 4.5,-8 L 4.5,-10 L -4.5,-10 L -4.5,-8 Z
M 4.5,8 L 4.5,10 L -4.5,10 L -4.5,8 Z
M 5,-8 A 1.5 1.5 0 0 0 3.5,-9.5 L -3.5,-9.5 A 1.5 1.5 0 0 0 -5,-8 L -5,5.5 L 0,10.5 L 5,5.5 Z
M 4.5,-6 L 4.5,-9 L -4.5,-9 L -4.5,-6 Z
M 4.5,4 L 0,8.5 L -4.5,4 L -4.5,5 L 0,10 L 4.5,5 Z
================================================
FILE: 3rdparty/ColorPickerControls/Chips/ColorChip.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Chips/ColorChip.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using ColorPickerControls.Dialogs;
using ColorPicker;
namespace ColorPickerControls.Chips
{
///
/// Interaction logic for ColorChip.xaml
///
public partial class ColorChip : UserControl
{
public enum EMouseEvent
{
mouseDown,
mouseUp,
mouseDoubleClick
}
public event EventHandler> ColorChanged;
public ColorChip()
{
InitializeComponent();
}
private EColorDialog mColorDialog = EColorDialog.Full;
[Category("ColorPicker")]
public EColorDialog ColorDialog
{
get { return mColorDialog; }
set { mColorDialog = value; }
}
private EMouseEvent mDialogEvent = EMouseEvent.mouseDown;
[Category("ColorPicker")]
public EMouseEvent DialogEvent
{
get{ return mDialogEvent;}
set { mDialogEvent = value; }
}
public static Type ClassType
{
get { return typeof(ColorChip); }
}
#region Color
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Color), ClassType, new PropertyMetadata(Colors.Gray, new PropertyChangedCallback(OnColorChanged)));
[Category("ColorPicker")]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
}
}
private static void OnColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ColorChip) d;
var color = (Color) e.NewValue;
chip.OnColorChanged(color);
}
private void OnColorChanged(Color color)
{
Brush = new SolidColorBrush(color);
colorRect.Background = Brush;
}
#endregion
#region Brush
public static DependencyProperty BrushProperty = DependencyProperty.Register("Brush", typeof(SolidColorBrush), ClassType, new PropertyMetadata(null, OnBrushChanged));
public SolidColorBrush Brush
{
get
{
return (SolidColorBrush)GetValue(BrushProperty);
}
set
{
SetValue(BrushProperty, value);
}
}
private static void OnBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ColorChip)d;
var brush = (SolidColorBrush) e.NewValue;
chip.Color = brush.Color;
}
#endregion
private IColorDialog CreateDialog()
{
IColorDialog dialog = null;
switch (ColorDialog)
{
case EColorDialog.Full:
dialog = new ColorPickerFullDialog();
break;
case EColorDialog.FullWithAlpha:
dialog = new ColorPickerFullWithAlphaDialog();
break;
case EColorDialog.Standard:
dialog = new ColorPickerStandardDialog();
break;
case EColorDialog.StandardWithAlpha :
dialog = new ColorPickerStandardWithAlphaDialog();
break;
}
return dialog;
}
public event EventHandler> PreviewColor;
protected void OnPreviewColor(EventArgs color)
{
Color = color.Value;
var handler = PreviewColor;
if (handler != null)
handler(this, color);
}
private void ShowDialog()
{
var dia = CreateDialog();
var initialColor = ((SolidColorBrush)colorRect.Background).Color;
dia.InitialColor = initialColor; //set the initial color
dia.PreviewColor += (s, a) => OnPreviewColor(a);
if (dia.ShowDialog() == true)
{
if (dia.SelectedColor != initialColor)
{
Color = dia.SelectedColor;
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(dia.SelectedColor));
}
}
}
else
{
Color = initialColor;
if (ColorChanged != null)
{
ColorChanged(this, new EventArgs(initialColor));
}
}
}
private void UserControl_MouseDown(object sender, MouseButtonEventArgs e)
{
if (DialogEvent == EMouseEvent.mouseDown)
{
ShowDialog();
e.Handled = true;
}
}
private void UserControl_MouseUp(object sender, MouseButtonEventArgs e)
{
if (DialogEvent == EMouseEvent.mouseUp)
{
ShowDialog();
e.Handled = true;
}
}
private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (DialogEvent == EMouseEvent.mouseDoubleClick )
{
ShowDialog();
e.Handled = true;
}
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Chips/ForegroundBackgroundChip.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Chips/ForegroundBackgroundChip.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using ColorPickerControls.Dialogs;
using ColorPicker;
namespace ColorPickerControls.Chips
{
///
/// Interaction logic for ForegroundBackgroundChip.xaml
///
public partial class ForegroundBackgroundChip : UserControl
{
public ForegroundBackgroundChip()
{
InitializeComponent();
foreChip.ColorChanged += (s, ea) => ForegroundColor = ea.Value;
backChip.ColorChanged += (s, ea) => BackgroundColor = ea.Value;
}
public event EventHandler> ForegroundColorChanged;
public event EventHandler> ForegroundBrushChanged;
public event EventHandler> BackgroundColorChanged;
public event EventHandler> BackgroundBrushChanged;
public static Type ClassType
{
get { return typeof(ForegroundBackgroundChip); }
}
#region DefaultForeground
public static DependencyProperty DefaultForegroundProperty = DependencyProperty.Register("DefaultForeground", typeof(Color), ClassType, new PropertyMetadata(Colors.Black , OnDefaultForegroundChanged));
[Category("ColorPicker")]
public Color DefaultForeground
{
get
{
return (Color)GetValue(DefaultForegroundProperty);
}
set
{
SetValue(DefaultForegroundProperty, value);
}
}
private static void OnDefaultForegroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip)d;
chip.rForegroundDefault.Fill = new SolidColorBrush((Color)e.NewValue);
}
#endregion
#region DefaultBackground
public static DependencyProperty DefaultBackgroundProperty = DependencyProperty.Register("DefaultBackground", typeof(Color), ClassType,
new PropertyMetadata(Colors.White , OnDefaultBackgroundChanged));
[Category("ColorPicker")]
public Color DefaultBackground
{
get
{
return (Color)GetValue(DefaultBackgroundProperty);
}
set
{
SetValue(DefaultBackgroundProperty, value);
}
}
private static void OnDefaultBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip) d;
chip.rBackgroundDefault.Fill = new SolidColorBrush((Color)e.NewValue);
}
#endregion
#region ForegroundColor
public static DependencyProperty ForegroundColorProperty = DependencyProperty.Register("ForegroundColor", typeof(Color), ClassType, new PropertyMetadata(Colors.Black, OnForegroundColorChanged));
[Category("ColorPicker")]
public Color ForegroundColor
{
get
{
return (Color)GetValue(ForegroundColorProperty);
}
set
{
SetValue(ForegroundColorProperty, value);
}
}
private static void OnForegroundColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip) d;
chip.foreChip.Color =(Color) e.NewValue;
chip.ForegroundBrush = new SolidColorBrush(chip.foreChip.Color);
if (chip.ForegroundColorChanged != null)
{
chip.ForegroundColorChanged(chip, new EventArgs(chip.foreChip.Color));
}
}
#endregion
#region BackgroundColor
public static DependencyProperty BackgroundColorProperty = DependencyProperty.Register("BackgroundColor", typeof(Color), ClassType, new PropertyMetadata(Colors.Black, OnBackgroundColorChanged));
[Category("ColorPicker")]
public Color BackgroundColor
{
get
{
return (Color)GetValue(BackgroundColorProperty);
}
set
{
SetValue(BackgroundColorProperty, value);
}
}
private static void OnBackgroundColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip)d;
chip.backChip.Color = (Color)e.NewValue;
chip.BackgroundBrush = new SolidColorBrush(chip.backChip.Color);
if (chip.BackgroundColorChanged != null)
{
chip.BackgroundColorChanged(chip, new EventArgs(chip.backChip.Color));
}
}
#endregion
#region BackgroundBrush
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(SolidColorBrush), ClassType,
new PropertyMetadata(new SolidColorBrush(Colors.White ), OnBackgroundBrushChanged));
public SolidColorBrush BackgroundBrush
{
get
{
return (SolidColorBrush)GetValue(BackgroundBrushProperty);
}
set
{
SetValue(BackgroundBrushProperty, value);
}
}
private static void OnBackgroundBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip)d;
if (chip.BackgroundBrushChanged != null)
{
chip.BackgroundBrushChanged(chip, new EventArgs(chip.backChip.Brush));
}
}
#endregion
#region ForegroundBrush
public static DependencyProperty ForegroundBrushProperty = DependencyProperty.Register("ForegroundBrush", typeof(SolidColorBrush), ClassType,
new PropertyMetadata(new SolidColorBrush(Colors.Black ), OnForegroundBrushChanged));
[Category("ColorPicker")]
public SolidColorBrush ForegroundBrush
{
get
{
return (SolidColorBrush)GetValue(ForegroundBrushProperty);
}
set
{
SetValue(ForegroundBrushProperty, value);
}
}
private static void OnForegroundBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var chip = (ForegroundBackgroundChip)d;
if (chip.ForegroundBrushChanged != null)
{
chip.ForegroundBrushChanged(chip, new EventArgs(chip.foreChip.Brush));
}
}
#endregion
private EColorDialog mColorDialog = EColorDialog.Full;
[Category("ColorPicker")]
public EColorDialog ColorDialog
{
get { return mColorDialog; }
set { mColorDialog = value;
foreChip.ColorDialog = value;
backChip.ColorDialog = value;
}
}
private void rForegroundDefault_MouseDown(object sender, MouseButtonEventArgs e)
{
ForegroundColor = DefaultForeground;
BackgroundColor = DefaultBackground;
}
private void rBackgroundDefault_MouseDown(object sender, MouseButtonEventArgs e)
{
ForegroundColor = DefaultForeground;
BackgroundColor = DefaultBackground;
}
private void rSwitch_MouseDown(object sender, MouseButtonEventArgs e)
{
var color = ForegroundColor;
ForegroundColor = BackgroundColor;
BackgroundColor = color;
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/ColorPickerControls.csproj
================================================
Debug
AnyCPU
8.0.30703
2.0
{02E6C16F-757F-44AC-BE66-C0D79C0EBE0B}
library
Properties
ColorPickerControls
ColorPickerControls
v4.6
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
false
pdbonly
true
bin\Release\
TRACE
prompt
4
false
..\..\packages\System.Reactive.4.4.1\lib\net46\System.Reactive.dll
..\..\packages\System.Reactive.Windows.Threading.4.4.1\lib\net46\System.Reactive.Windows.Threading.dll
..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll
..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll
..\..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
4.0
ColorChip.xaml
ForegroundBackgroundChip.xaml
ColorPickerFullDialog.xaml
ColorPickerStandardDialog.xaml
ColorPickerStandardWithAlphaDialog.xaml
ColorPickerFull.xaml
ColorPickerFullWithAlpha.xaml
ColorPickerFullWithAlphaDialog.xaml
ColorPickerStandard.xaml
ColorPickerStandardWithAlpha.xaml
Code
True
True
Resources.resx
True
Settings.settings
True
ResXFileCodeGenerator
Resources.Designer.cs
SettingsSingleFileGenerator
Settings.Designer.cs
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
MSBuild:Compile
Designer
MSBuild:Compile
Designer
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
MSBuild:Compile
Designer
MSBuild:Compile
Designer
{059DC6C7-59C6-4ADF-8960-976A02E7498E}
ColorPicker
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerFullDialog.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerFullDialog.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Dialogs
{
///
/// Interaction logic for ColorPickerFullDialog.xaml
///
public partial class ColorPickerFullDialog : Window , IColorDialog
{
public event EventHandler> PreviewColor
{
add { colorPickerFull.SelectedColorChanged += value; }
remove { colorPickerFull.SelectedColorChanged -= value; }
}
public ColorPickerFullDialog()
{
InitializeComponent();
}
private void btOk_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void btCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
}
[Category("ColorPicker")]
public Color SelectedColor
{
get { return colorPickerFull.SelectedColor; }
set { colorPickerFull.SelectedColor = value; }
}
[Category("ColorPicker")]
public Color InitialColor
{
get { return colorPickerFull.InitialColor; }
set
{
colorPickerFull.InitialColor = value;
colorPickerFull.SelectedColor = value;
}
}
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorPickerFull.SelectionRingMode; }
set { colorPickerFull.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerFullWithAlphaDialog.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerFullWithAlphaDialog.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Dialogs
{
///
/// Interaction logic for ColorPickerFullWithAlphaDialog.xaml
///
public partial class ColorPickerFullWithAlphaDialog : Window, IColorDialog
{
public event EventHandler> PreviewColor
{
add { colorPickerFullWithAlpha.SelectedColorChanged += value; }
remove { colorPickerFullWithAlpha.SelectedColorChanged -= value; }
}
public ColorPickerFullWithAlphaDialog()
{
InitializeComponent();
}
private void btOk_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void btCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
}
[Category("ColorPicker")]
public Color SelectedColor
{
get { return colorPickerFullWithAlpha.SelectedColor; }
set { colorPickerFullWithAlpha.SelectedColor = value; }
}
[Category("ColorPicker")]
public Color InitialColor
{
get { return colorPickerFullWithAlpha.InitialColor; }
set
{
colorPickerFullWithAlpha.InitialColor = value;
colorPickerFullWithAlpha.SelectedColor = value;
}
}
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorPickerFullWithAlpha.SelectionRingMode; }
set { colorPickerFullWithAlpha.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerStandardDialog.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerStandardDialog.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Dialogs
{
///
/// Interaction logic for ColorPickerDialog.xaml
///
public partial class ColorPickerStandardDialog : Window , IColorDialog
{
public event EventHandler> PreviewColor
{
add { colorPickerFull.SelectedColorChanged += value; }
remove { colorPickerFull.SelectedColorChanged -= value; }
}
public ColorPickerStandardDialog()
{
InitializeComponent();
}
private void btOk_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void btCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
}
[Category("ColorPicker")]
public Color SelectedColor
{
get { return colorPickerFull.SelectedColor; }
set { colorPickerFull.SelectedColor = value; }
}
[Category("ColorPicker")]
public Color InitialColor
{
get { return colorPickerFull.InitialColor; }
set
{
colorPickerFull.InitialColor = value;
colorPickerFull.SelectedColor = value;
}
}
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorPickerFull.SelectionRingMode; }
set { colorPickerFull.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerStandardWithAlphaDialog.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/ColorPickerStandardWithAlphaDialog.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Dialogs
{
///
/// Interaction logic for ColorPickerDialog.xaml
///
public partial class ColorPickerStandardWithAlphaDialog : Window , IColorDialog
{
public event EventHandler> PreviewColor
{
add { colorPickerFull.SelectedColorChanged += value; }
remove { colorPickerFull.SelectedColorChanged -= value; }
}
public ColorPickerStandardWithAlphaDialog()
{
InitializeComponent();
}
private void btOk_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void btCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
}
[Category("ColorPicker")]
public Color SelectedColor
{
get { return colorPickerFull.SelectedColor; }
set { colorPickerFull.SelectedColor = value; }
}
[Category("ColorPicker")]
public Color InitialColor
{
get { return colorPickerFull.InitialColor; }
set
{
colorPickerFull.InitialColor = value;
colorPickerFull.SelectedColor = value;
}
}
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorPickerFull.SelectionRingMode; }
set { colorPickerFull.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/EColorDialog.cs
================================================
namespace ColorPickerControls.Dialogs
{
public enum EColorDialog
{
Standard,
Full,
StandardWithAlpha,
FullWithAlpha
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Dialogs/IColorDialog.cs
================================================
using System;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Dialogs
{
interface IColorDialog
{
event EventHandler> PreviewColor;
Color SelectedColor { get; set; }
Color InitialColor { get; set; }
bool? ShowDialog();
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerFull.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerFull.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Pickers
{
///
/// Interaction logic for ColorPickerFull.xaml
///
public partial class ColorPickerFull : UserControl
{
public static Type ClassType
{
get { return typeof(ColorPickerFull); }
}
#region InitialColor
public static DependencyProperty InitialColorProperty = DependencyProperty.Register("InitialColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnInitialColorChanged));
[Category("ColorPicker")]
public Color InitialColor
{
get
{
return (Color)GetValue(InitialColorProperty);
}
set
{
SetValue(InitialColorProperty, value);
}
}
private static void OnInitialColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerFull) d;
cpf.newCurrent.CurrentColor = (Color) e.NewValue ;
}
#endregion
public event EventHandler> SelectedColorChanged;
#region SelectedColor
public static DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
[Category("ColorPicker")]
public Color SelectedColor
{
get
{
return (Color)GetValue(SelectedColorProperty);
}
set
{
SetValue(SelectedColorProperty, value);
}
}
private static void OnSelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerFull)d;
cpf.colorSelector.Color = (Color)e.NewValue;
if (cpf.SelectedColorChanged != null)
{
cpf.SelectedColorChanged(cpf, new EventArgs((Color)e.NewValue));
}
}
#endregion
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorSelector.SelectionRingMode; }
set { colorSelector.SelectionRingMode = value;}
}
public ColorPickerFull()
{
InitializeComponent();
SetBinding(SelectedColorProperty, "Color");
DataContext = colorSelector;
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerFullWithAlpha.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerFullWithAlpha.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
using ColorPicker;
namespace ColorPickerControls.Pickers
{
///
/// Interaction logic for ColorPickerFullWithAlpha.xaml
///
public partial class ColorPickerFullWithAlpha : UserControl
{
public ColorPickerFullWithAlpha()
{
InitializeComponent();
colorSelector.ColorChanged += colorSelector_ColorChanged;
alphaDisplay.AlphaChanged += alphaDisplay_AlphaChanged;
SelectedColorChanged += (s, a) => _selectedColorChanged.OnNext(a.Value);
}
void alphaDisplay_AlphaChanged(object sender, ColorPicker.EventArgs e)
{
SetValue(SelectedColorProperty,SelectedColor.WithAlpha(e.Value));
if (SelectedColorChanged != null)
{
SelectedColorChanged(this, new EventArgs(SelectedColor));
}
}
void colorSelector_ColorChanged(object sender, ColorPicker.EventArgs e)
{
SetValue(SelectedColorProperty, e.Value.WithAlpha(alphaDisplay.Alpha ));
if (SelectedColorChanged != null)
{
SelectedColorChanged(this, new EventArgs(SelectedColor));
}
}
public static Type ClassType
{
get { return typeof(ColorPickerFullWithAlpha); }
}
#region InitialColor
public static DependencyProperty InitialColorProperty = DependencyProperty.Register("InitialColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnInitialColorChanged));
[Category("ColorPicker")]
public Color InitialColor
{
get
{
return (Color)GetValue(InitialColorProperty);
}
set
{
SetValue(InitialColorProperty, value);
}
}
private static void OnInitialColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerFullWithAlpha)d;
cpf.newCurrent.CurrentColor = (Color)e.NewValue;
}
#endregion
bool _isUpdatingView = true;
readonly Subject _selectedColorChanged = new Subject();
public IObservable UserChangedColor
{
get { return _selectedColorChanged.Where(_ => !_isUpdatingView); }
}
public event EventHandler> SelectedColorChanged;
#region SelectedColor
public static DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
[Category("ColorPicker")]
public Color SelectedColor
{
get
{
return (Color)GetValue(SelectedColorProperty);
}
set
{
_isUpdatingView = true;
try
{
SetValue(SelectedColorProperty, value);
}
finally
{
_isUpdatingView = false;
}
}
}
private static void OnSelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerFullWithAlpha)d;
var color = (Color)e.NewValue;
cpf.colorSelector.Color = color;
cpf.alphaDisplay.Alpha = color.A;
if (cpf.SelectedColorChanged != null)
{
cpf.SelectedColorChanged(cpf, new EventArgs(color ));
}
}
#endregion
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorSelector.SelectionRingMode; }
set { colorSelector.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerStandard.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerStandard.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ColorPicker;
namespace ColorPickerControls.Pickers
{
///
/// Interaction logic for ColorPickerFull.xaml
///
public partial class ColorPickerStandard : UserControl
{
public static Type ClassType
{
get { return typeof(ColorPickerStandard); }
}
#region InitialColor
public static DependencyProperty InitialColorProperty = DependencyProperty.Register("InitialColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnInitialColorChanged));
[Category("ColorPicker")]
public Color InitialColor
{
get
{
return (Color)GetValue(InitialColorProperty);
}
set
{
SetValue(InitialColorProperty, value);
}
}
private static void OnInitialColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerStandard)d;
cpf.newCurrent.CurrentColor = (Color) e.NewValue ;
}
#endregion
public event EventHandler> SelectedColorChanged;
#region SelectedColor
public static DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
[Category("ColorPicker")]
public Color SelectedColor
{
get
{
return (Color)GetValue(SelectedColorProperty);
}
set
{
SetValue(SelectedColorProperty, value);
}
}
private static void OnSelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerStandard)d;
cpf.colorSelector.Color = (Color)e.NewValue;
if (cpf.SelectedColorChanged != null)
{
cpf.SelectedColorChanged(cpf, new EventArgs((Color)e.NewValue));
}
}
#endregion
public ColorPickerStandard()
{
InitializeComponent();
SetBinding(SelectedColorProperty, "Color");
DataContext = colorSelector;
}
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorSelector.SelectionRingMode; }
set { colorSelector.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerStandardWithAlpha.xaml
================================================
================================================
FILE: 3rdparty/ColorPickerControls/Pickers/ColorPickerStandardWithAlpha.xaml.cs
================================================
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ColorPicker.ExtensionMethods;
using ColorPicker;
namespace ColorPickerControls.Pickers
{
///
/// Interaction logic for ColorPickerFullWithAlpha.xaml
///
public partial class ColorPickerStandardWithAlpha : UserControl
{
public ColorPickerStandardWithAlpha()
{
InitializeComponent();
colorSelector.ColorChanged += colorSelector_ColorChanged;
alphaDisplay.AlphaChanged += alphaDisplay_AlphaChanged;
}
void alphaDisplay_AlphaChanged(object sender, ColorPicker.EventArgs e)
{
SetValue(SelectedColorProperty,SelectedColor.WithAlpha(e.Value));
if (SelectedColorChanged != null)
{
SelectedColorChanged(this, new EventArgs(SelectedColor));
}
}
void colorSelector_ColorChanged(object sender, ColorPicker.EventArgs e)
{
SetValue(SelectedColorProperty, e.Value.WithAlpha(alphaDisplay.Alpha ));
if (SelectedColorChanged != null)
{
SelectedColorChanged(this, new EventArgs(SelectedColor));
}
}
public static Type ClassType
{
get { return typeof(ColorPickerStandardWithAlpha); }
}
#region InitialColor
public static DependencyProperty InitialColorProperty = DependencyProperty.Register("InitialColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnInitialColorChanged));
[Category("ColorPicker")]
public Color InitialColor
{
get
{
return (Color)GetValue(InitialColorProperty);
}
set
{
SetValue(InitialColorProperty, value);
}
}
private static void OnInitialColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerStandardWithAlpha)d;
cpf.newCurrent.CurrentColor = (Color)e.NewValue;
if (cpf.SelectedColorChanged != null)
{
cpf.SelectedColorChanged(cpf, new EventArgs((Color)e.NewValue));
}
}
#endregion
public event EventHandler> SelectedColorChanged;
#region SelectedColor
public static DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), ClassType,
new FrameworkPropertyMetadata(Colors.Transparent, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
[Category("ColorPicker")]
public Color SelectedColor
{
get
{
return (Color)GetValue(SelectedColorProperty);
}
set
{
SetValue(SelectedColorProperty, value);
}
}
private static void OnSelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var cpf = (ColorPickerStandardWithAlpha)d;
var color = (Color)e.NewValue;
cpf.colorSelector.Color = color;
cpf.alphaDisplay.Alpha = color.A;
}
#endregion
[Category("ColorPicker")]
public ColorSelector.ESelectionRingMode SelectionRingMode
{
get { return colorSelector.SelectionRingMode; }
set { colorSelector.SelectionRingMode = value; }
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ColorPickerControls")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("ColorPickerControls")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
//inside a . For example, if you are using US english
//in your source files, set the to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: 3rdparty/ColorPickerControls/Properties/Resources.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace ColorPickerControls.Properties {
using System;
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ColorPickerControls.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Properties/Resources.resx
================================================
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
================================================
FILE: 3rdparty/ColorPickerControls/Properties/Settings.Designer.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace ColorPickerControls.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
================================================
FILE: 3rdparty/ColorPickerControls/Properties/Settings.settings
================================================
================================================
FILE: 3rdparty/ColorPickerControls/packages.config
================================================
================================================
FILE: 3rdparty/NRefactory/.gitattributes
================================================
*.cs text diff=csharp
*.sln text eol=crlf
*.csproj text eol=crlf
================================================
FILE: 3rdparty/NRefactory/.gitignore
================================================
bin
obj
*.suo
/lib/*.dll
/ICSharpCode.NRefactory.Tests/PartCover/*
_ReSharper*/*
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Analysis/AbiComparer.cs
================================================
//
// ABIComparer.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
using System.Collections.Generic;
using System.Linq;
namespace ICSharpCode.NRefactory.Analysis
{
///
/// Used to check the compatibility state of two compilations.
///
public enum AbiCompatibility
{
///
/// The ABI is equal
///
Equal,
///
/// Some items got added, but the ABI remains to be compatible
///
Bigger,
///
/// The ABI has changed
///
Incompatible
}
[Serializable]
public sealed class AbiEventArgs : EventArgs
{
public string Message { get; set; }
public AbiEventArgs(string message)
{
this.Message = message;
}
}
///
/// The Abi comparer checks the public API of two compilation and determines the compatibility state.
///
public class AbiComparer
{
public bool StopOnIncompatibility {
get;
set;
}
void CheckContstraints(IType otype, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
{
if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of type {0} have changed."), otype.FullName)));
compatibility = AbiCompatibility.Incompatible;
}
}
void CheckContstraints(IMethod omethod, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
{
if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of method {0} have changed."), omethod.FullName)));
compatibility = AbiCompatibility.Incompatible;
}
}
void CheckTypes (ITypeDefinition oType, ITypeDefinition nType, ref AbiCompatibility compatibility)
{
int oldMemberCount = 0;
Predicate pred = null;
if (oType.Kind == TypeKind.Class || oType.Kind == TypeKind.Struct)
pred = m => (m.IsPublic || m.IsProtected) && !m.IsOverride && !m.IsSynthetic;
for (int i = 0; i < oType.TypeParameterCount; i++) {
CheckContstraints (oType, oType.TypeParameters[i], nType.TypeParameters[i], ref compatibility);
if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
return;
}
foreach (var member in oType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers)) {
var newMember = nType.GetMembers (m => member.UnresolvedMember.Name == m.Name && m.IsPublic == member.IsPublic && m.IsProtected == member.IsProtected);
var equalMember = newMember.FirstOrDefault (m => SignatureComparer.Ordinal.Equals (member, m));
if (equalMember == null) {
compatibility = AbiCompatibility.Incompatible;
if (StopOnIncompatibility)
return;
continue;
}
var om = member as IMethod;
if (om != null) {
for (int i = 0; i < om.TypeParameters.Count; i++) {
CheckContstraints (om, om.TypeParameters[i], ((IMethod)equalMember).TypeParameters[i], ref compatibility);
if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
return;
}
}
oldMemberCount++;
}
if (compatibility == AbiCompatibility.Bigger && oType.Kind != TypeKind.Interface)
return;
if (oldMemberCount != nType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers).Count ()) {
if (oType.Kind == TypeKind.Interface) {
OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Interafce {0} has changed."), oType.FullName)));
compatibility = AbiCompatibility.Incompatible;
} else {
if (compatibility == AbiCompatibility.Equal)
compatibility = AbiCompatibility.Bigger;
}
}
}
void CheckNamespace(INamespace oNs, INamespace nNs, ref AbiCompatibility compatibility)
{
foreach (var type in oNs.Types) {
if (!type.IsPublic && !type.IsProtected)
continue;
var newType = nNs.GetTypeDefinition (type.Name, type.TypeParameterCount);
if (newType == null) {
OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type definition {0} is missing."), type.FullName)));
compatibility = AbiCompatibility.Incompatible;
if (StopOnIncompatibility)
return;
continue;
}
CheckTypes (type, newType, ref compatibility);
if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
return;
}
if (compatibility == AbiCompatibility.Bigger)
return;
foreach (var type in nNs.Types) {
if (!type.IsPublic && !type.IsProtected)
continue;
if (oNs.GetTypeDefinition (type.Name, type.TypeParameterCount) == null) {
if (compatibility == AbiCompatibility.Equal)
compatibility = AbiCompatibility.Bigger;
return;
}
}
}
static bool ContainsPublicTypes(INamespace testNs)
{
var stack = new Stack ();
stack.Push (testNs);
while (stack.Count > 0) {
var ns = stack.Pop ();
if (ns.Types.Any (t => t.IsPublic))
return true;
foreach (var child in ns.ChildNamespaces)
stack.Push (child);
}
return false;
}
///
/// Check the specified oldProject and newProject if they're compatible.
///
/// Old project.
/// New project.
public AbiCompatibility Check (ICompilation oldProject, ICompilation newProject)
{
var oldStack = new Stack ();
var newStack = new Stack ();
oldStack.Push (oldProject.MainAssembly.RootNamespace);
newStack.Push (newProject.MainAssembly.RootNamespace);
AbiCompatibility compatibility = AbiCompatibility.Equal;
while (oldStack.Count > 0) {
var oNs = oldStack.Pop ();
var nNs = newStack.Pop ();
CheckNamespace (oNs, nNs, ref compatibility);
if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
return AbiCompatibility.Incompatible;
foreach (var child in oNs.ChildNamespaces) {
var newChild = nNs.GetChildNamespace (child.Name);
if (newChild == null) {
OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Namespace {0} is missing."), child.FullName)));
if (StopOnIncompatibility)
return AbiCompatibility.Incompatible;
continue;
}
oldStack.Push (child);
newStack.Push (newChild);
}
// check if namespaces are added
if (compatibility != AbiCompatibility.Bigger) {
foreach (var child in nNs.ChildNamespaces) {
if (oNs.GetChildNamespace (child.Name) == null) {
if (compatibility == AbiCompatibility.Equal && ContainsPublicTypes (child))
compatibility = AbiCompatibility.Bigger;
break;
}
}
}
}
return compatibility;
}
public virtual string TranslateString(string str)
{
return str;
}
public event EventHandler IncompatibilityFound;
protected virtual void OnIncompatibilityFound(AbiEventArgs e)
{
var handler = IncompatibilityFound;
if (handler != null)
handler(this, e);
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Analysis/SymbolCollector.cs
================================================
// Copyright (c) 2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem;
using System.Linq;
namespace ICSharpCode.NRefactory.Analysis
{
///
/// The symbol collector collects related symbols that form a group of symbols that should be renamed
/// when a name of one symbol changes. For example if a type definition name should be changed
/// the constructors and destructor names should change as well.
///
public class SymbolCollector
{
///
/// Gets or sets a value indicating whether this should include overloads.
///
/// true if overloads should be included; otherwise, false.
public bool IncludeOverloads {
get;
set;
}
public bool GroupForRenaming {
get;
set;
}
static IEnumerable CollectTypeRelatedMembers (ITypeDefinition type)
{
yield return type;
foreach (var c in type.GetDefinition ().GetMembers (m => !m.IsSynthetic && (m.SymbolKind == SymbolKind.Constructor || m.SymbolKind == SymbolKind.Destructor), GetMemberOptions.IgnoreInheritedMembers)) {
yield return c;
}
}
static IEnumerable CollectOverloads (IMethod method)
{
return method.DeclaringType
.GetMethods (m => m.Name == method.Name)
.Where (m => m != method);
}
static IMember SearchMember (ITypeDefinition derivedType, IMember method)
{
foreach (var m in derivedType.Members) {
if (m.ImplementedInterfaceMembers.Contains (method))
return m;
}
return null;
}
static IEnumerable MakeUnique (List symbols)
{
HashSet taken = new HashSet ();
foreach (var sym in symbols) {
if (taken.Contains (sym))
continue;
taken.Add (sym);
yield return sym;
}
}
///
/// Gets the related symbols.
///
/// The related symbols.
/// The type graph.
/// The symbol to search
public IEnumerable GetRelatedSymbols(Lazy g, ISymbol m)
{
switch (m.SymbolKind) {
case SymbolKind.TypeDefinition:
return CollectTypeRelatedMembers ((ITypeDefinition)m);
case SymbolKind.Field:
case SymbolKind.Operator:
case SymbolKind.Variable:
case SymbolKind.Parameter:
case SymbolKind.TypeParameter:
return new ISymbol[] { m };
case SymbolKind.Constructor:
if (GroupForRenaming)
return GetRelatedSymbols (g, ((IMethod)m).DeclaringTypeDefinition);
List constructorSymbols = new List ();
if (IncludeOverloads) {
foreach (var m3 in CollectOverloads ((IMethod)m)) {
constructorSymbols.Add (m3);
}
}
return constructorSymbols;
case SymbolKind.Destructor:
if (GroupForRenaming)
return GetRelatedSymbols (g, ((IMethod)m).DeclaringTypeDefinition);
return new ISymbol[] { m };
case SymbolKind.Indexer:
case SymbolKind.Event:
case SymbolKind.Property:
case SymbolKind.Method: {
var member = (IMember)m;
List symbols = new List ();
if (!member.IsExplicitInterfaceImplementation)
symbols.Add (member);
if (GroupForRenaming) {
foreach (var m2 in member.ImplementedInterfaceMembers) {
symbols.AddRange (GetRelatedSymbols (g, m2));
}
} else {
symbols.AddRange(member.ImplementedInterfaceMembers);
}
if (member.DeclaringType.Kind == TypeKind.Interface) {
var declaringTypeNode = g.Value.GetNode(member.DeclaringTypeDefinition);
if (declaringTypeNode != null) {
foreach (var derivedType in declaringTypeNode.DerivedTypes) {
var mem = SearchMember (derivedType.TypeDefinition, member);
if (mem != null)
symbols.Add (mem);
}
}
}
if (IncludeOverloads) {
IncludeOverloads = false;
if (member is IMethod) {
foreach (var m3 in CollectOverloads ((IMethod)member)) {
symbols.AddRange (GetRelatedSymbols (g, m3));
}
} else if (member.SymbolKind == SymbolKind.Indexer) {
symbols.AddRange (member.DeclaringTypeDefinition.GetProperties (p => p.IsIndexer));
}
}
return MakeUnique (symbols);
}
case SymbolKind.Namespace:
// TODO?
return new ISymbol[] { m };
default:
throw new ArgumentOutOfRangeException ("symbol:"+m.SymbolKind);
}
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Analysis/TypeGraph.cs
================================================
// Copyright (c) 2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Analysis
{
///
/// A graph where type definitions are nodes; and edges are given by inheritance.
///
public class TypeGraph
{
Dictionary dict;
///
/// Builds a graph of all type definitions in the specified set of assemblies.
///
/// The input assemblies. The assemblies may belong to multiple compilations.
/// The resulting graph may be cyclic if there are cyclic type definitions.
public TypeGraph(IEnumerable assemblies)
{
if (assemblies == null)
throw new ArgumentNullException("assemblies");
dict = new Dictionary();
foreach (IAssembly assembly in assemblies) {
foreach (ITypeDefinition typeDef in assembly.GetAllTypeDefinitions()) {
// Overwrite previous entry - duplicates can occur if there are multiple versions of the
// same project loaded in the solution (e.g. separate .csprojs for separate target frameworks)
dict[new AssemblyQualifiedTypeName(typeDef)] = new TypeGraphNode(typeDef);
}
}
foreach (IAssembly assembly in assemblies) {
foreach (ITypeDefinition typeDef in assembly.GetAllTypeDefinitions()) {
TypeGraphNode typeNode = dict[new AssemblyQualifiedTypeName(typeDef)];
foreach (IType baseType in typeDef.DirectBaseTypes) {
ITypeDefinition baseTypeDef = baseType.GetDefinition();
if (baseTypeDef != null) {
TypeGraphNode baseTypeNode;
if (dict.TryGetValue(new AssemblyQualifiedTypeName(baseTypeDef), out baseTypeNode)) {
typeNode.BaseTypes.Add(baseTypeNode);
baseTypeNode.DerivedTypes.Add(typeNode);
}
}
}
}
}
}
public TypeGraphNode GetNode(ITypeDefinition typeDefinition)
{
if (typeDefinition == null)
return null;
return GetNode(new AssemblyQualifiedTypeName(typeDefinition));
}
public TypeGraphNode GetNode(AssemblyQualifiedTypeName typeName)
{
TypeGraphNode node;
if (dict.TryGetValue(typeName, out node))
return node;
else
return null;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Analysis/TypeGraphNode.cs
================================================
// Copyright (c) 2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Analysis
{
public sealed class TypeGraphNode
{
readonly ITypeDefinition typeDef;
readonly List baseTypes = new List();
readonly List derivedTypes = new List();
///
/// Creates a new unconnected type graph node.
///
public TypeGraphNode(ITypeDefinition typeDef)
{
this.typeDef = typeDef;
}
public ITypeDefinition TypeDefinition {
get { return typeDef; }
}
public IList DerivedTypes {
get { return derivedTypes; }
}
public IList BaseTypes {
get { return baseTypes; }
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/CompletionCategory.cs
================================================
//
// CompletionCategory.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Completion
{
public abstract class CompletionCategory : IComparable
{
public string DisplayText { get; set; }
public string Icon { get; set; }
protected CompletionCategory ()
{
}
protected CompletionCategory (string displayText, string icon)
{
this.DisplayText = displayText;
this.Icon = icon;
}
public abstract int CompareTo (CompletionCategory other);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/CompletionExtensionMethods.cs
================================================
//
// CompletionExtensionMethods.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
using System.Linq;
namespace ICSharpCode.NRefactory.Completion
{
public static class CompletionExtensionMethods
{
///
/// Gets the EditorBrowsableState of an entity.
///
///
/// The editor browsable state.
///
///
/// Entity.
///
public static System.ComponentModel.EditorBrowsableState GetEditorBrowsableState(this IEntity entity)
{
if (entity == null)
throw new ArgumentNullException ("entity");
var browsableState = entity.Attributes.FirstOrDefault(attr => attr.AttributeType.Name == "EditorBrowsableAttribute" && attr.AttributeType.Namespace == "System.ComponentModel");
if (browsableState != null && browsableState.PositionalArguments.Count == 1) {
if (browsableState.PositionalArguments [0].ConstantValue is int)
return (System.ComponentModel.EditorBrowsableState)(int)browsableState.PositionalArguments [0].ConstantValue;
}
return System.ComponentModel.EditorBrowsableState.Always;
}
///
/// Determines if an entity should be shown in the code completion window. This is the same as:
/// GetEditorBrowsableState (entity) != System.ComponentModel.EditorBrowsableState.Never
///
///
/// true if the entity should be shown; otherwise, false.
///
///
/// The entity.
///
public static bool IsBrowsable(this IEntity entity)
{
return GetEditorBrowsableState (entity) != System.ComponentModel.EditorBrowsableState.Never;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/DisplayFlags.cs
================================================
//
// DisplayFlags.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Completion
{
[Flags]
public enum DisplayFlags
{
None = 0,
Hidden = 1,
Obsolete = 2,
DescriptionHasMarkup = 4,
NamedArgument = 8,
IsImportCompletion = 16,
MarkedBold = 32
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/FrameworkLookup.cs
================================================
//
// FrameworkLookup.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.Completion
{
///
/// The framework lookup provides a fast lookup where an unknow type or extension method may be defined in.
///
public sealed class FrameworkLookup
{
/* Binary format:
* [Header]
* [Version] : [Major (byte)] [Minor (byte)] [Build (byte)]
* [#Types (int)]
* [#Methods (int)]
* [#Assemblies (int)]
* [AssemblyListTable] : #Assemblies x [OffsetToAssemblyLists (int)]
* [TypeLookupTable] : #Types x ( [NameHash (int)] [AssemblyPtrToAssemblyListTable (ushort)]
* [ExtMethodLookupTable] : #Methods x ( [NameHash (int)] [AssemblyPtrToAssemblyListTable (ushort)]
* [AssemblyLists]
* [#Count (byte)]
* #Count x [AssemblyLookup] : [Package (string)] [FullName (string)] [Namespace (string)]
*/
const int headerSize =
3 + // Version
4 + // #Types
4 + // #Methods
4 // #Assembly
/* + 4*/;
public static readonly Version CurrentVersion = new Version (2, 0, 1);
public static readonly FrameworkLookup Empty = new FrameworkLookup ();
string fileName;
int[] assemblyListTable;
int[] typeLookupTable;
int[] extLookupTable;
///
/// This method tries to get a matching extension method.
///
/// The extension method lookups.
/// The resolve result.
public IEnumerable GetExtensionMethodLookups (UnknownMemberResolveResult resolveResult)
{
return GetLookup (resolveResult.MemberName, extLookupTable, headerSize + assemblyListTable.Length * 4 + typeLookupTable.Length * 8);
}
///
/// Tries to get a type out of an unknow identifier result.
///
/// The assemblies the type may be defined (if any).
/// The resolve result.
/// Type parameter count.
/// If set to true this resolve result may be inside an attribute.
public IEnumerable GetLookups (UnknownIdentifierResolveResult resolveResult, int typeParameterCount, bool isInsideAttributeType)
{
string name = isInsideAttributeType ? resolveResult.Identifier + "Attribute" : resolveResult.Identifier;
var identifier = GetIdentifier (name, typeParameterCount);
return GetLookup (identifier, typeLookupTable, headerSize + assemblyListTable.Length * 4);
}
///
/// Tries to get a type out of an unknow member resolve result. (In case of fully qualified names)
///
/// The assemblies the type may be defined (if any).
/// The resolve result.
///
/// Type parameter count.
/// If set to true this resolve result may be inside an attribute.
public IEnumerable GetLookups (UnknownMemberResolveResult resolveResult, string fullMemberName, int typeParameterCount, bool isInsideAttributeType)
{
string name = isInsideAttributeType ? resolveResult.MemberName + "Attribute" : resolveResult.MemberName;
var identifier = GetIdentifier (name, typeParameterCount);
foreach (var lookup in GetLookup (identifier, typeLookupTable, headerSize + assemblyListTable.Length * 4)) {
if (fullMemberName.StartsWith (lookup.Namespace, StringComparison.Ordinal))
yield return lookup;
}
}
///
/// The assembly lookup determines where a type might be defined.
/// It contains the assembly & the namespace.
///
public struct AssemblyLookup
{
readonly string nspace;
///
/// The namespace the requested type is in.
///
public string Namespace {
get {
return nspace;
}
}
readonly string fullName;
///
/// Gets the full name af the assembly.
///
public string FullName {
get {
return fullName;
}
}
readonly string package;
///
/// Gets the package the assembly is in.
///
public string Package {
get {
return package;
}
}
///
/// Initializes a new instance of the struct.
///
/// The package name.
/// The full name of the assembly.
/// The namespace the type is in.
internal AssemblyLookup (string package, string fullName, string nspace)
{
if (nspace == null)
throw new ArgumentNullException ("nspace");
if (fullName == null)
throw new ArgumentNullException ("fullName");
this.package = package;
this.fullName = fullName;
this.nspace = nspace;
}
public override string ToString ()
{
return string.Format ("[AssemblyLookup: Namespace={0}, FullName={1}, Package={2}]", Namespace, FullName, Package);
}
public override bool Equals (object obj)
{
if (obj == null)
return false;
// if (ReferenceEquals (this, obj))
// return true;
if (obj.GetType () != typeof(AssemblyLookup))
return false;
var other = (AssemblyLookup)obj;
return Namespace == other.Namespace && FullName == other.FullName && Package == other.Package;
}
public override int GetHashCode ()
{
unchecked {
return (Namespace != null ? Namespace.GetHashCode () : 0) ^
(FullName != null ? FullName.GetHashCode () : 0) ^
(Package != null ? Package.GetHashCode () : 0);
}
}
}
///
/// This method returns a new framework builder to build a new framework lookup data file.
///
/// The file name of the data file.
public static FrameworkBuilder Create (string fileName)
{
return new FrameworkBuilder (fileName);
}
///
/// Loads a framework lookup object from a file. May return null, if the file wasn't found or has a version mismatch.
///
/// File name.
public static FrameworkLookup Load (string fileName)
{
try {
if (!File.Exists (fileName))
return null;
} catch (Exception) {
return null;
}
var result = new FrameworkLookup ();
result.fileName = fileName;
var fs = File.OpenRead (fileName);
using (var reader = new BinaryReader (fs, Encoding.UTF8)) {
var major = reader.ReadByte ();
var minor = reader.ReadByte ();
var build = reader.ReadByte ();
var version = new Version (major, minor, build);
if (version != CurrentVersion)
return null;
int typeLookupListCount = reader.ReadInt32 ();
int extLookupListCount = reader.ReadInt32 ();
int assemblyLookupCount = reader.ReadInt32 ();
result.assemblyListTable = new int[assemblyLookupCount];
for (int i = 0; i < assemblyLookupCount; i++) {
result.assemblyListTable[i] = reader.ReadInt32 ();
}
result.typeLookupTable = new int[typeLookupListCount];
for (int i = 0; i < typeLookupListCount; i++) {
result.typeLookupTable [i] = reader.ReadInt32 ();
// skip list offset
reader.ReadInt32 ();
}
result.extLookupTable = new int[extLookupListCount];
for (int i = 0; i < extLookupListCount; i++) {
result.extLookupTable [i] = reader.ReadInt32 ();
// skip list offset
reader.ReadInt32 ();
}
}
return result;
}
FrameworkLookup ()
{
}
IEnumerable GetLookup (string identifier, int[] lookupTable, int tableOffset)
{
if (lookupTable == null)
yield break;
int index = Array.BinarySearch (lookupTable, GetStableHashCode (identifier));
if (index < 0)
yield break;
using (var reader = new BinaryReader (File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8)) {
reader.BaseStream.Seek (tableOffset + index * 8 + 4, SeekOrigin.Begin);
int listPtr = reader.ReadInt32 ();
reader.BaseStream.Seek (listPtr, SeekOrigin.Begin);
var b = reader.ReadInt32 ();
var assemblies = new List ();
while (b-- > 0) {
var assembly = reader.ReadUInt16 ();
if (assembly < 0 || assembly >= assemblyListTable.Length)
throw new InvalidDataException ("Assembly lookup was " + assembly + " but only " + assemblyListTable.Length + " are known.");
assemblies.Add (assembly);
}
foreach (var assembly in assemblies) {
reader.BaseStream.Seek (assemblyListTable [assembly], SeekOrigin.Begin);
var package = reader.ReadString ();
var fullName = reader.ReadString ();
var ns = reader.ReadString ();
yield return new AssemblyLookup (package, fullName, ns);
}
}
}
///
/// Retrieves a hash code for the specified string that is stable across
/// .NET upgrades.
///
/// Use this method instead of the normal string.GetHashCode if the hash code
/// is persisted to disk.
///
static int GetStableHashCode(string text)
{
unchecked {
int h = 0;
foreach (char c in text) {
h = (h << 5) - h + c;
}
return h;
}
}
static string GetIdentifier (string identifier, int tc)
{
if (tc == 0)
return identifier;
return identifier + "`" + tc;
}
public class FrameworkBuilder : IDisposable
{
readonly string fileName;
Dictionary> typeLookup = new Dictionary> ();
Dictionary> extensionMethodLookup = new Dictionary> ();
List assemblyLookups = new List ();
Dictionary methodCheck = new Dictionary ();
Dictionary typeCheck = new Dictionary ();
internal FrameworkBuilder (string fileName)
{
this.fileName = fileName;
}
static int[] WriteTable (MemoryStream stream, Dictionary> table, out List>> list)
{
list = new List>> (table);
list.Sort ((x, y) => x.Key.CompareTo (y.Key));
var result = new int[list.Count];
using (var bw = new BinaryWriter (stream)) {
for (int i = 0; i < result.Length; i++) {
result [i] = (int)stream.Length;
bw.Write (list [i].Value.Count);
foreach (var ii in list [i].Value)
bw.Write (ii);
}
}
return result;
}
#region IDisposable implementation
void IDisposable.Dispose ()
{
var typeLookupMemory = new MemoryStream ();
List>> typeLookupList;
var typeTable = WriteTable (typeLookupMemory, typeLookup, out typeLookupList);
var extMethodLookupMemory = new MemoryStream ();
List>> extMethodLookuplist;
var extMethodTable = WriteTable (extMethodLookupMemory, extensionMethodLookup, out extMethodLookuplist);
var assemblyLookupMemory = new MemoryStream ();
var assemblyPositionTable = new int[assemblyLookups.Count];
using (var writer = new BinaryWriter (assemblyLookupMemory, Encoding.UTF8)) {
for (int i = 0; i < assemblyLookups.Count; i++) {
var lookup = assemblyLookups[i];
assemblyPositionTable[i] = (int)assemblyLookupMemory.Length;
writer.Write (lookup.Package);
writer.Write (lookup.FullName);
writer.Write (lookup.Namespace);
}
}
using (var stream = new BinaryWriter (File.OpenWrite (fileName), Encoding.UTF8)) {
stream.Write ((byte)CurrentVersion.Major);
stream.Write ((byte)CurrentVersion.Minor);
stream.Write ((byte)CurrentVersion.Build);
stream.Write (typeLookupList.Count);
stream.Write (extMethodLookuplist.Count);
stream.Write (assemblyLookups.Count);
var typeBuffer = typeLookupMemory.ToArray ();
var extMethodBuffer = extMethodLookupMemory.ToArray ();
int dataOffset =
headerSize +
assemblyLookups.Count * 4 +
typeLookupList.Count * (4 + 4) +
extMethodLookuplist.Count * (4 + 4);
for (int i = 0; i < assemblyLookups.Count; i++) {
stream.Write ((int)(dataOffset + typeBuffer.Length + extMethodBuffer.Length + assemblyPositionTable[i]));
}
for (int i = 0; i < typeLookupList.Count; i++) {
stream.Write (typeLookupList [i].Key);
stream.Write (dataOffset + typeTable[i]);
}
for (int i = 0; i < extMethodLookuplist.Count; i++) {
stream.Write (extMethodLookuplist [i].Key);
stream.Write (dataOffset + typeBuffer.Length + extMethodTable[i]);
}
stream.Write (typeBuffer);
stream.Write (extMethodBuffer);
stream.Write (assemblyLookupMemory.ToArray ());
stream.Flush ();
}
}
#endregion
struct FrameworkLookupId
{
public string PackageName;
public string AssemblyName;
public string NameSpace;
}
Dictionary frameworkLookupTable = new Dictionary ();
ushort GetLookup (string packageName, string assemblyName, string ns)
{
var id = new FrameworkLookupId {
PackageName = packageName,
AssemblyName = assemblyName,
NameSpace = ns
};
ushort value;
if (frameworkLookupTable.TryGetValue (id, out value))
return value;
var result = new AssemblyLookup (packageName, assemblyName, ns);
assemblyLookups.Add (result);
var index = assemblyLookups.Count - 1;
if (index > ushort.MaxValue)
throw new InvalidOperationException ("Assembly lookup list overflow > " + ushort.MaxValue + " assemblies.");
frameworkLookupTable.Add (id, (ushort)index);
return (ushort)index;
}
bool AddToTable (string packageName, string assemblyName, Dictionary> table, Dictionary checkTable, string id, string ns)
{
List list;
var hash = GetStableHashCode (id);
if (!table.TryGetValue (hash, out list)) {
list = new List ();
table [hash] = list;
} else {
string existingString;
if (checkTable.TryGetValue (hash, out existingString)) {
if (existingString != id)
throw new InvalidOperationException ("Duplicate hash for " + existingString + " and "+ id);
} else {
checkTable.Add (hash, id);
}
}
var assemblyLookup = GetLookup (packageName, assemblyName, ns);
if (!list.Any (a => a.Equals (assemblyLookup))) {
list.Add (assemblyLookup);
return true;
}
return false;
}
///
/// Add a type to the framework lookup.
///
/// The package the assembly of the type is defined (can be null).
/// The full assembly name the type is defined (needs to be != null).
/// The type definition (needs to be != null).
public void AddLookup (string packageName, string fullAssemblyName, IUnresolvedTypeDefinition type)
{
if (fullAssemblyName == null)
throw new ArgumentNullException ("fullAssemblyName");
if (type == null)
throw new ArgumentNullException ("type");
var id = GetIdentifier (type.Name, type.TypeParameters.Count);
if (AddToTable (packageName, fullAssemblyName, typeLookup, typeCheck, id, type.Namespace)) {
if (type.IsSealed || type.IsStatic) {
foreach (var method in type.Methods) {
var m = method as DefaultUnresolvedMethod;
if (m == null || !m.IsExtensionMethod)
continue;
AddToTable (packageName, fullAssemblyName, extensionMethodLookup, methodCheck, method.Name, method.DeclaringTypeDefinition.Namespace);
}
}
}
}
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/ICompletionData.cs
================================================
//
// ICompletionData.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
namespace ICSharpCode.NRefactory.Completion
{
public interface ICompletionData
{
CompletionCategory CompletionCategory { get; set; }
string DisplayText { get; set; }
string Description { get; set; }
string CompletionText { get; set; }
DisplayFlags DisplayFlags { get; set; }
bool HasOverloads {
get;
}
IEnumerable OverloadedData {
get;
}
void AddOverload (ICompletionData data);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs
================================================
//
// IEntityCompletionData.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Completion
{
public interface IEntityCompletionData : ICompletionData
{
IEntity Entity {
get;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/IParameterDataProvider.cs
================================================
//
// IParameterDataProvider.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.NRefactory.Completion
{
///
/// Provides intellisense information for a collection of parametrized members.
///
public interface IParameterDataProvider
{
///
/// Gets the overload count.
///
int Count {
get;
}
///
/// Gets the start offset of the parameter expression node.
///
int StartOffset {
get;
}
///
/// Returns the markup to use to represent the specified method overload
/// in the parameter information window.
///
string GetHeading (int overload, string[] parameterDescription, int currentParameter);
///
/// Returns the markup for the description to use to represent the specified method overload
/// in the parameter information window.
///
string GetDescription (int overload, int currentParameter);
///
/// Returns the text to use to represent the specified parameter
///
string GetParameterDescription (int overload, int paramIndex);
///
/// Gets the name of the parameter.
///
string GetParameterName (int overload, int currentParameter);
///
/// Returns the number of parameters of the specified method
///
int GetParameterCount (int overload);
///
/// Used for the params lists. (for example "params" in c#).
///
bool AllowParameterList (int overload);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Completion/IVariableCompletionData.cs
================================================
//
// IVariableCompletionData.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Completion
{
public interface IVariableCompletionData : ICompletionData
{
IVariable Variable {
get;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/DocumentationComment.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Documentation
{
///
/// Represents a documentation comment.
///
public class DocumentationComment
{
ITextSource xml;
protected readonly ITypeResolveContext context;
///
/// Gets the XML code for this documentation comment.
///
public ITextSource Xml {
get { return xml; }
}
///
/// Creates a new DocumentationComment.
///
/// The XML text.
/// Context for resolving cref attributes.
public DocumentationComment(ITextSource xml, ITypeResolveContext context)
{
if (xml == null)
throw new ArgumentNullException("xml");
if (context == null)
throw new ArgumentNullException("context");
this.xml = xml;
this.context = context;
}
///
/// Creates a new DocumentationComment.
///
/// The XML text.
/// Context for resolving cref attributes.
public DocumentationComment(string xml, ITypeResolveContext context)
{
if (xml == null)
throw new ArgumentNullException("xml");
if (context == null)
throw new ArgumentNullException("context");
this.xml = new StringTextSource(xml);
this.context = context;
}
///
/// Resolves the given cref value to an entity.
/// Returns null if the entity is not found, or if the cref attribute is syntactically invalid.
///
public virtual IEntity ResolveCref(string cref)
{
try {
return IdStringProvider.FindEntity(cref, context);
} catch (ReflectionNameParseException) {
return null;
}
}
public override string ToString ()
{
return Xml.Text;
}
public static implicit operator string (DocumentationComment documentationComment)
{
if (documentationComment != null)
return documentationComment.ToString ();
return null;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/GetPotentiallyNestedClassTypeReference.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.Documentation
{
///
/// A type reference of the form 'Some.Namespace.TopLevelType.NestedType`n'.
/// We do not know the boundary between namespace name and top level type, so we have to try
/// all possibilities.
/// The type parameter count only applies to the innermost type, all outer types must be non-generic.
///
[Serializable]
class GetPotentiallyNestedClassTypeReference : ITypeReference
{
readonly string typeName;
readonly int typeParameterCount;
public GetPotentiallyNestedClassTypeReference(string typeName, int typeParameterCount)
{
this.typeName = typeName;
this.typeParameterCount = typeParameterCount;
}
public IType Resolve(ITypeResolveContext context)
{
string[] parts = typeName.Split('.');
var assemblies = new [] { context.CurrentAssembly }.Concat(context.Compilation.Assemblies);
for (int i = parts.Length - 1; i >= 0; i--) {
string ns = string.Join(".", parts, 0, i);
string name = parts[i];
int topLevelTPC = (i == parts.Length - 1 ? typeParameterCount : 0);
foreach (var asm in assemblies) {
if (asm == null)
continue;
ITypeDefinition typeDef = asm.GetTypeDefinition(new TopLevelTypeName(ns, name, topLevelTPC));
for (int j = i + 1; j < parts.Length && typeDef != null; j++) {
int tpc = (j == parts.Length - 1 ? typeParameterCount : 0);
typeDef = typeDef.NestedTypes.FirstOrDefault(n => n.Name == parts[j] && n.TypeParameterCount == tpc);
}
if (typeDef != null)
return typeDef;
}
}
int idx = typeName.LastIndexOf('.');
if (idx < 0)
return new UnknownType("", typeName, typeParameterCount);
// give back a guessed namespace/type name
return new UnknownType(typeName.Substring(0, idx), typeName.Substring(idx + 1), typeParameterCount);
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/IDocumentationProvider.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.IO;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Documentation
{
///
/// Provides XML documentation for entities.
///
public interface IDocumentationProvider
{
///
/// Gets the XML documentation for the specified entity.
///
DocumentationComment GetDocumentation(IEntity entity);
}
///
/// Provides XML documentation for entities.
///
public interface IUnresolvedDocumentationProvider
{
///
/// Gets the XML documentation for the specified entity.
///
string GetDocumentation(IUnresolvedEntity entity);
///
/// Gets the XML documentation for the specified entity.
///
DocumentationComment GetDocumentation(IUnresolvedEntity entity, IEntity resolvedEntity);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/IdStringMemberReference.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Documentation
{
[Serializable]
class IdStringMemberReference : IMemberReference
{
readonly ITypeReference declaringTypeReference;
readonly char memberType;
readonly string memberIdString;
public IdStringMemberReference(ITypeReference declaringTypeReference, char memberType, string memberIdString)
{
this.declaringTypeReference = declaringTypeReference;
this.memberType = memberType;
this.memberIdString = memberIdString;
}
bool CanMatch(IUnresolvedMember member)
{
switch (member.SymbolKind) {
case SymbolKind.Field:
return memberType == 'F';
case SymbolKind.Property:
case SymbolKind.Indexer:
return memberType == 'P';
case SymbolKind.Event:
return memberType == 'E';
case SymbolKind.Method:
case SymbolKind.Operator:
case SymbolKind.Constructor:
case SymbolKind.Destructor:
return memberType == 'M';
default:
throw new NotSupportedException(member.SymbolKind.ToString());
}
}
public ITypeReference DeclaringTypeReference {
get { return declaringTypeReference; }
}
public IMember Resolve(ITypeResolveContext context)
{
IType declaringType = declaringTypeReference.Resolve(context);
foreach (var member in declaringType.GetMembers(CanMatch, GetMemberOptions.IgnoreInheritedMembers)) {
if (IdStringProvider.GetIdString(member) == memberIdString)
return member;
}
return null;
}
ISymbol ISymbolReference.Resolve(ITypeResolveContext context)
{
return Resolve(context);
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/IdStringProvider.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.Documentation
{
///
/// Provides ID strings for entities. (C# 4.0 spec, §A.3.1)
/// ID strings are used to identify members in XML documentation files.
///
public static class IdStringProvider
{
#region GetIdString
///
/// Gets the ID string (C# 4.0 spec, §A.3.1) for the specified entity.
///
public static string GetIdString(this IEntity entity)
{
StringBuilder b = new StringBuilder();
switch (entity.SymbolKind) {
case SymbolKind.TypeDefinition:
b.Append("T:");
AppendTypeName(b, (ITypeDefinition)entity, false);
return b.ToString();
case SymbolKind.Field:
b.Append("F:");
break;
case SymbolKind.Property:
case SymbolKind.Indexer:
b.Append("P:");
break;
case SymbolKind.Event:
b.Append("E:");
break;
default:
b.Append("M:");
break;
}
IMember member = (IMember)entity;
AppendTypeName(b, member.DeclaringType, false);
b.Append('.');
if (member.IsExplicitInterfaceImplementation && member.Name.IndexOf('.') < 0 && member.ImplementedInterfaceMembers.Count == 1) {
AppendTypeName(b, member.ImplementedInterfaceMembers[0].DeclaringType, true);
b.Append('#');
}
b.Append(member.Name.Replace('.', '#'));
IMethod method = member as IMethod;
if (method != null && method.TypeParameters.Count > 0) {
b.Append("``");
b.Append(method.TypeParameters.Count);
}
IParameterizedMember parameterizedMember = member as IParameterizedMember;
if (parameterizedMember != null && parameterizedMember.Parameters.Count > 0) {
b.Append('(');
var parameters = parameterizedMember.Parameters;
for (int i = 0; i < parameters.Count; i++) {
if (i > 0) b.Append(',');
AppendTypeName(b, parameters[i].Type, false);
}
b.Append(')');
}
if (member.SymbolKind == SymbolKind.Operator && (member.Name == "op_Implicit" || member.Name == "op_Explicit")) {
b.Append('~');
AppendTypeName(b, member.ReturnType, false);
}
return b.ToString();
}
#endregion
#region GetTypeName
public static string GetTypeName(IType type)
{
if (type == null)
throw new ArgumentNullException("type");
StringBuilder b = new StringBuilder();
AppendTypeName(b, type, false);
return b.ToString();
}
static void AppendTypeName(StringBuilder b, IType type, bool explicitInterfaceImpl)
{
switch (type.Kind) {
case TypeKind.Dynamic:
b.Append(explicitInterfaceImpl ? "System#Object" : "System.Object");
break;
case TypeKind.TypeParameter:
ITypeParameter tp = (ITypeParameter)type;
if (explicitInterfaceImpl) {
b.Append(tp.Name);
} else {
b.Append('`');
if (tp.OwnerType == SymbolKind.Method)
b.Append('`');
b.Append(tp.Index);
}
break;
case TypeKind.Array:
ArrayType array = (ArrayType)type;
AppendTypeName(b, array.ElementType, explicitInterfaceImpl);
b.Append('[');
if (array.Dimensions > 1) {
for (int i = 0; i < array.Dimensions; i++) {
if (i > 0)
b.Append(explicitInterfaceImpl ? '@' : ',');
if (!explicitInterfaceImpl)
b.Append("0:");
}
}
b.Append(']');
break;
case TypeKind.Pointer:
AppendTypeName(b, ((PointerType)type).ElementType, explicitInterfaceImpl);
b.Append('*');
break;
case TypeKind.ByReference:
AppendTypeName(b, ((ByReferenceType)type).ElementType, explicitInterfaceImpl);
b.Append('@');
break;
default:
IType declType = type.DeclaringType;
if (declType != null) {
AppendTypeName(b, declType, explicitInterfaceImpl);
b.Append(explicitInterfaceImpl ? '#' : '.');
b.Append(type.Name);
AppendTypeParameters(b, type, declType.TypeParameterCount, explicitInterfaceImpl);
} else {
if (explicitInterfaceImpl)
b.Append(type.FullName.Replace('.', '#'));
else
b.Append(type.FullName);
AppendTypeParameters(b, type, 0, explicitInterfaceImpl);
}
break;
}
}
static void AppendTypeParameters(StringBuilder b, IType type, int outerTypeParameterCount, bool explicitInterfaceImpl)
{
int tpc = type.TypeParameterCount - outerTypeParameterCount;
if (tpc > 0) {
ParameterizedType pt = type as ParameterizedType;
if (pt != null) {
b.Append('{');
var ta = pt.TypeArguments;
for (int i = outerTypeParameterCount; i < ta.Count; i++) {
if (i > outerTypeParameterCount)
b.Append(explicitInterfaceImpl ? '@' : ',');
AppendTypeName(b, ta[i], explicitInterfaceImpl);
}
b.Append('}');
} else {
b.Append('`');
b.Append(tpc);
}
}
}
#endregion
#region ParseMemberName
///
/// Parse the ID string into a member reference.
///
/// The ID string representing the member (with "M:", "F:", "P:" or "E:" prefix).
/// A member reference that represents the ID string.
/// The syntax of the ID string is invalid
///
/// The member reference will look in first,
/// and if the member is not found there,
/// it will look in all other assemblies of the compilation.
///
public static IMemberReference ParseMemberIdString(string memberIdString)
{
if (memberIdString == null)
throw new ArgumentNullException("memberIdString");
if (memberIdString.Length < 2 || memberIdString[1] != ':')
throw new ReflectionNameParseException(0, "Missing type tag");
char typeChar = memberIdString[0];
int parenPos = memberIdString.IndexOf('(');
if (parenPos < 0)
parenPos = memberIdString.LastIndexOf('~');
if (parenPos < 0)
parenPos = memberIdString.Length;
int dotPos = memberIdString.LastIndexOf('.', parenPos - 1);
if (dotPos < 0)
throw new ReflectionNameParseException(0, "Could not find '.' separating type name from member name");
string typeName = memberIdString.Substring(0, dotPos);
int pos = 2;
ITypeReference typeReference = ParseTypeName(typeName, ref pos);
if (pos != typeName.Length)
throw new ReflectionNameParseException(pos, "Expected end of type name");
// string memberName = memberIDString.Substring(dotPos + 1, parenPos - (dotPos + 1));
// pos = memberName.LastIndexOf("``");
// if (pos > 0)
// memberName = memberName.Substring(0, pos);
// memberName = memberName.Replace('#', '.');
return new IdStringMemberReference(typeReference, typeChar, memberIdString);
}
#endregion
#region ParseTypeName
///
/// Parse the ID string type name into a type reference.
///
/// The ID string representing the type (the "T:" prefix is optional).
/// A type reference that represents the ID string.
/// The syntax of the ID string is invalid
///
///
/// The type reference will look in first,
/// and if the type is not found there,
/// it will look in all other assemblies of the compilation.
///
///
/// If the type is open (contains type parameters '`0' or '``0'),
/// an with the appropriate CurrentTypeDefinition/CurrentMember is required
/// to resolve the reference to the ITypeParameter.
///
///
public static ITypeReference ParseTypeName(string typeName)
{
if (typeName == null)
throw new ArgumentNullException("typeName");
int pos = 0;
if (typeName.StartsWith("T:", StringComparison.Ordinal))
pos = 2;
ITypeReference r = ParseTypeName(typeName, ref pos);
if (pos < typeName.Length)
throw new ReflectionNameParseException(pos, "Expected end of type name");
return r;
}
static bool IsIDStringSpecialCharacter(char c)
{
switch (c) {
case ':':
case '{':
case '}':
case '[':
case ']':
case '(':
case ')':
case '`':
case '*':
case '@':
case ',':
return true;
default:
return false;
}
}
static ITypeReference ParseTypeName(string typeName, ref int pos)
{
string reflectionTypeName = typeName;
if (pos == typeName.Length)
throw new ReflectionNameParseException(pos, "Unexpected end");
ITypeReference result;
if (reflectionTypeName[pos] == '`') {
// type parameter reference
pos++;
if (pos == reflectionTypeName.Length)
throw new ReflectionNameParseException(pos, "Unexpected end");
if (reflectionTypeName[pos] == '`') {
// method type parameter reference
pos++;
int index = ReflectionHelper.ReadTypeParameterCount(reflectionTypeName, ref pos);
result = TypeParameterReference.Create(SymbolKind.Method, index);
} else {
// class type parameter reference
int index = ReflectionHelper.ReadTypeParameterCount(reflectionTypeName, ref pos);
result = TypeParameterReference.Create(SymbolKind.TypeDefinition, index);
}
} else {
// not a type parameter reference: read the actual type name
List typeArguments = new List();
int typeParameterCount;
string typeNameWithoutSuffix = ReadTypeName(typeName, ref pos, true, out typeParameterCount, typeArguments);
result = new GetPotentiallyNestedClassTypeReference(typeNameWithoutSuffix, typeParameterCount);
while (pos < typeName.Length && typeName[pos] == '.') {
pos++;
string nestedTypeName = ReadTypeName(typeName, ref pos, false, out typeParameterCount, typeArguments);
result = new NestedTypeReference(result, nestedTypeName, typeParameterCount);
}
if (typeArguments.Count > 0) {
result = new ParameterizedTypeReference(result, typeArguments);
}
}
while (pos < typeName.Length) {
switch (typeName[pos]) {
case '[':
int dimensions = 1;
do {
pos++;
if (pos == typeName.Length)
throw new ReflectionNameParseException(pos, "Unexpected end");
if (typeName[pos] == ',')
dimensions++;
} while (typeName[pos] != ']');
result = new ArrayTypeReference(result, dimensions);
break;
case '*':
result = new PointerTypeReference(result);
break;
case '@':
result = new ByReferenceTypeReference(result);
break;
default:
return result;
}
pos++;
}
return result;
}
static string ReadTypeName(string typeName, ref int pos, bool allowDottedName, out int typeParameterCount, List typeArguments)
{
int startPos = pos;
// skip the simple name portion:
while (pos < typeName.Length && !IsIDStringSpecialCharacter(typeName[pos]) && (allowDottedName || typeName[pos] != '.'))
pos++;
if (pos == startPos)
throw new ReflectionNameParseException(pos, "Expected type name");
string shortTypeName = typeName.Substring(startPos, pos - startPos);
// read type arguments:
typeParameterCount = 0;
if (pos < typeName.Length && typeName[pos] == '`') {
// unbound generic type
pos++;
typeParameterCount = ReflectionHelper.ReadTypeParameterCount(typeName, ref pos);
} else if (pos < typeName.Length && typeName[pos] == '{') {
// bound generic type
typeArguments = new List();
do {
pos++;
typeArguments.Add(ParseTypeName(typeName, ref pos));
typeParameterCount++;
if (pos == typeName.Length)
throw new ReflectionNameParseException(pos, "Unexpected end");
} while (typeName[pos] == ',');
if (typeName[pos] != '}')
throw new ReflectionNameParseException(pos, "Expected '}'");
pos++;
}
return shortTypeName;
}
#endregion
#region FindEntity
///
/// Finds the entity in the given type resolve context.
///
/// ID string of the entity.
/// Type resolve context
/// Returns the entity, or null if it is not found.
/// The syntax of the ID string is invalid
public static IEntity FindEntity(string idString, ITypeResolveContext context)
{
if (idString == null)
throw new ArgumentNullException("idString");
if (context == null)
throw new ArgumentNullException("context");
if (idString.StartsWith("T:", StringComparison.Ordinal)) {
return ParseTypeName(idString.Substring(2)).Resolve(context).GetDefinition();
} else {
return ParseMemberIdString(idString).Resolve(context);
}
}
#endregion
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Documentation/XmlDocumentationProvider.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.Serialization;
using System.Xml;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.Documentation
{
///
/// Provides documentation from an .xml file (as generated by the Microsoft C# compiler).
///
///
/// This class first creates an in-memory index of the .xml file, and then uses that to read only the requested members.
/// This way, we avoid keeping all the documentation in memory.
/// The .xml file is only opened when necessary, the file handle is not kept open all the time.
/// If the .xml file is changed, the index will automatically be recreated.
///
[Serializable]
public class XmlDocumentationProvider : IDocumentationProvider, IDeserializationCallback
{
#region Cache
sealed class XmlDocumentationCache
{
readonly KeyValuePair[] entries;
int pos;
public XmlDocumentationCache(int size = 50)
{
if (size <= 0)
throw new ArgumentOutOfRangeException("size", size, "Value must be positive");
this.entries = new KeyValuePair[size];
}
internal bool TryGet(string key, out string value)
{
foreach (var pair in entries) {
if (pair.Key == key) {
value = pair.Value;
return true;
}
}
value = null;
return false;
}
internal void Add(string key, string value)
{
entries[pos++] = new KeyValuePair(key, value);
if (pos == entries.Length)
pos = 0;
}
}
#endregion
[Serializable]
struct IndexEntry : IComparable
{
///
/// Hash code of the documentation tag
///
internal readonly int HashCode;
///
/// Position in the .xml file where the documentation starts
///
internal readonly int PositionInFile;
internal IndexEntry(int hashCode, int positionInFile)
{
this.HashCode = hashCode;
this.PositionInFile = positionInFile;
}
public int CompareTo(IndexEntry other)
{
return this.HashCode.CompareTo(other.HashCode);
}
}
[NonSerialized]
XmlDocumentationCache cache = new XmlDocumentationCache();
readonly string fileName;
volatile IndexEntry[] index; // SORTED array of index entries
#region Constructor / Redirection support
///
/// Creates a new XmlDocumentationProvider.
///
/// Name of the .xml file.
/// Error reading from XML file (or from redirected file)
/// Invalid XML file
public XmlDocumentationProvider(string fileName)
{
if (fileName == null)
throw new ArgumentNullException("fileName");
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) {
using (XmlTextReader xmlReader = new XmlTextReader(fs)) {
xmlReader.XmlResolver = null; // no DTD resolving
xmlReader.MoveToContent();
if (string.IsNullOrEmpty(xmlReader.GetAttribute("redirect"))) {
this.fileName = fileName;
ReadXmlDoc(xmlReader);
} else {
string redirectionTarget = GetRedirectionTarget(fileName, xmlReader.GetAttribute("redirect"));
if (redirectionTarget != null) {
Debug.WriteLine("XmlDoc " + fileName + " is redirecting to " + redirectionTarget);
using (FileStream redirectedFs = new FileStream(redirectionTarget, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) {
using (XmlTextReader redirectedXmlReader = new XmlTextReader(redirectedFs)) {
redirectedXmlReader.XmlResolver = null; // no DTD resolving
this.fileName = redirectionTarget;
ReadXmlDoc(redirectedXmlReader);
}
}
} else {
throw new XmlException("XmlDoc " + fileName + " is redirecting to " + xmlReader.GetAttribute("redirect") + ", but that file was not found.");
}
}
}
}
}
static string GetRedirectionTarget(string xmlFileName, string target)
{
string programFilesDir = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
programFilesDir = AppendDirectorySeparator(programFilesDir);
string corSysDir = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
corSysDir = AppendDirectorySeparator(corSysDir);
var fileName = target.Replace ("%PROGRAMFILESDIR%", programFilesDir)
.Replace ("%CORSYSDIR%", corSysDir);
if (!Path.IsPathRooted (fileName))
fileName = Path.Combine (Path.GetDirectoryName (xmlFileName), fileName);
return LookupLocalizedXmlDoc(fileName);
}
static string AppendDirectorySeparator(string dir)
{
if (dir.EndsWith("\\", StringComparison.Ordinal) || dir.EndsWith("/", StringComparison.Ordinal))
return dir;
else
return dir + Path.DirectorySeparatorChar;
}
///
/// Given the assembly file name, looks up the XML documentation file name.
/// Returns null if no XML documentation file is found.
///
public static string LookupLocalizedXmlDoc(string fileName)
{
string xmlFileName = Path.ChangeExtension(fileName, ".xml");
string currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
string localizedXmlDocFile = GetLocalizedName(xmlFileName, currentCulture);
Debug.WriteLine("Try find XMLDoc @" + localizedXmlDocFile);
if (File.Exists(localizedXmlDocFile)) {
return localizedXmlDocFile;
}
Debug.WriteLine("Try find XMLDoc @" + xmlFileName);
if (File.Exists(xmlFileName)) {
return xmlFileName;
}
if (currentCulture != "en") {
string englishXmlDocFile = GetLocalizedName(xmlFileName, "en");
Debug.WriteLine("Try find XMLDoc @" + englishXmlDocFile);
if (File.Exists(englishXmlDocFile)) {
return englishXmlDocFile;
}
}
return null;
}
static string GetLocalizedName(string fileName, string language)
{
string localizedXmlDocFile = Path.GetDirectoryName(fileName);
localizedXmlDocFile = Path.Combine(localizedXmlDocFile, language);
localizedXmlDocFile = Path.Combine(localizedXmlDocFile, Path.GetFileName(fileName));
return localizedXmlDocFile;
}
#endregion
#region Load / Create Index
void ReadXmlDoc(XmlTextReader reader)
{
//lastWriteDate = File.GetLastWriteTimeUtc(fileName);
// Open up a second file stream for the line<->position mapping
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) {
LinePositionMapper linePosMapper = new LinePositionMapper(fs);
List indexList = new List();
while (reader.Read()) {
if (reader.IsStartElement()) {
switch (reader.LocalName) {
case "members":
ReadMembersSection(reader, linePosMapper, indexList);
break;
}
}
}
indexList.Sort();
this.index = indexList.ToArray(); // volatile write
}
}
sealed class LinePositionMapper
{
readonly FileStream fs;
int currentLine = 1;
public LinePositionMapper(FileStream fs)
{
this.fs = fs;
}
public int GetPositionForLine(int line)
{
Debug.Assert(line >= currentLine);
while (line > currentLine) {
int b = fs.ReadByte();
if (b < 0)
throw new EndOfStreamException();
if (b == '\n') {
currentLine++;
}
}
return checked((int)fs.Position);
}
}
static void ReadMembersSection(XmlTextReader reader, LinePositionMapper linePosMapper, List indexList)
{
while (reader.Read()) {
switch (reader.NodeType) {
case XmlNodeType.EndElement:
if (reader.LocalName == "members") {
return;
}
break;
case XmlNodeType.Element:
if (reader.LocalName == "member") {
int pos = linePosMapper.GetPositionForLine(reader.LineNumber) + Math.Max(reader.LinePosition - 2, 0);
string memberAttr = reader.GetAttribute("name");
if (memberAttr != null)
indexList.Add(new IndexEntry(GetHashCode(memberAttr), pos));
reader.Skip();
}
break;
}
}
}
///
/// Hash algorithm used for the index.
/// This is a custom implementation so that old index files work correctly
/// even when the .NET string.GetHashCode implementation changes
/// (e.g. due to .NET 4.5 hash randomization)
///
static int GetHashCode(string key)
{
unchecked {
int h = 0;
foreach (char c in key) {
h = (h << 5) - h + c;
}
return h;
}
}
#endregion
#region GetDocumentation
///
/// Get the documentation for the member with the specified documentation key.
///
public string GetDocumentation(string key)
{
if (key == null)
throw new ArgumentNullException("key");
return GetDocumentation(key, true);
}
string GetDocumentation(string key, bool allowReload)
{
int hashcode = GetHashCode(key);
var index = this.index; // read volatile field
// index is sorted, so we can use binary search
int m = Array.BinarySearch(index, new IndexEntry(hashcode, 0));
if (m < 0)
return null;
// correct hash code found.
// possibly there are multiple items with the same hash, so go to the first.
while (--m >= 0 && index[m].HashCode == hashcode);
// m is now 1 before the first item with the correct hash
XmlDocumentationCache cache = this.cache;
lock (cache) {
string val;
if (!cache.TryGet(key, out val)) {
try {
// go through all items that have the correct hash
while (++m < index.Length && index[m].HashCode == hashcode) {
val = LoadDocumentation(key, index[m].PositionInFile);
if (val != null)
break;
}
// cache the result (even if it is null)
cache.Add(key, val);
} catch (IOException) {
// may happen if the documentation file was deleted/is inaccessible/changed (EndOfStreamException)
return allowReload ? ReloadAndGetDocumentation(key) : null;
} catch (XmlException) {
// may happen if the documentation file was changed so that the file position no longer starts on a valid XML element
return allowReload ? ReloadAndGetDocumentation(key) : null;
}
}
return val;
}
}
string ReloadAndGetDocumentation(string key)
{
try {
// Reload the index
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) {
using (XmlTextReader xmlReader = new XmlTextReader(fs)) {
xmlReader.XmlResolver = null; // no DTD resolving
xmlReader.MoveToContent();
ReadXmlDoc(xmlReader);
}
}
} catch (IOException) {
// Ignore errors on reload; IEntity.Documentation callers aren't prepared to handle exceptions
this.index = new IndexEntry[0]; // clear index to avoid future load attempts
return null;
} catch (XmlException) {
this.index = new IndexEntry[0]; // clear index to avoid future load attempts
return null;
}
return GetDocumentation(key, allowReload: false); // prevent infinite reload loops
}
#endregion
#region GetDocumentation for entity
///
public DocumentationComment GetDocumentation(IEntity entity)
{
string xmlDoc = GetDocumentation(IdStringProvider.GetIdString(entity));
if (xmlDoc != null) {
return new DocumentationComment(new StringTextSource(xmlDoc), new SimpleTypeResolveContext(entity));
} else {
return null;
}
}
#endregion
#region Load / Read XML
string LoadDocumentation(string key, int positionInFile)
{
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) {
fs.Position = positionInFile;
using (XmlTextReader r = new XmlTextReader(fs, XmlNodeType.Element, null)) {
r.XmlResolver = null; // no DTD resolving
while (r.Read()) {
if (r.NodeType == XmlNodeType.Element) {
string memberAttr = r.GetAttribute("name");
if (memberAttr == key) {
return r.ReadInnerXml();
} else {
return null;
}
}
}
return null;
}
}
}
#endregion
public virtual void OnDeserialization(object sender)
{
cache = new XmlDocumentationCache();
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/IDocument.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Editor
{
///
/// A document representing a source code file for refactoring.
/// Line and column counting starts at 1.
/// Offset counting starts at 0.
///
public interface IDocument : ITextSource, IServiceProvider
{
///
/// Creates an immutable snapshot of this document.
///
IDocument CreateDocumentSnapshot();
///
/// Gets/Sets the text of the whole document..
///
new string Text { get; set; } // hides ITextSource.Text to add the setter
///
/// This event is called directly before a change is applied to the document.
///
///
/// It is invalid to modify the document within this event handler.
/// Aborting the change (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
///
event EventHandler TextChanging;
///
/// This event is called directly after a change is applied to the document.
///
///
/// It is invalid to modify the document within this event handler.
/// Aborting the event handler (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
///
event EventHandler TextChanged;
///
/// This event is called after a group of changes is completed.
///
///
event EventHandler ChangeCompleted;
///
/// Gets the number of lines in the document.
///
int LineCount { get; }
///
/// Gets the document line with the specified number.
///
/// The number of the line to retrieve. The first line has number 1.
IDocumentLine GetLineByNumber(int lineNumber);
///
/// Gets the document line that contains the specified offset.
///
IDocumentLine GetLineByOffset(int offset);
///
/// Gets the offset from a text location.
///
///
int GetOffset(int line, int column);
///
/// Gets the offset from a text location.
///
///
int GetOffset(TextLocation location);
///
/// Gets the location from an offset.
///
///
TextLocation GetLocation(int offset);
///
/// Inserts text.
///
/// The offset at which the text is inserted.
/// The new text.
///
/// Anchors positioned exactly at the insertion offset will move according to their movement type.
/// For AnchorMovementType.Default, they will move behind the inserted text.
/// The caret will also move behind the inserted text.
///
void Insert(int offset, string text);
///
/// Inserts text.
///
/// The offset at which the text is inserted.
/// The new text.
///
/// Anchors positioned exactly at the insertion offset will move according to their movement type.
/// For AnchorMovementType.Default, they will move behind the inserted text.
/// The caret will also move behind the inserted text.
///
void Insert(int offset, ITextSource text);
///
/// Inserts text.
///
/// The offset at which the text is inserted.
/// The new text.
///
/// Anchors positioned exactly at the insertion offset will move according to the anchor's movement type.
/// For AnchorMovementType.Default, they will move according to the movement type specified by this parameter.
/// The caret will also move according to the parameter.
///
void Insert(int offset, string text, AnchorMovementType defaultAnchorMovementType);
///
/// Inserts text.
///
/// The offset at which the text is inserted.
/// The new text.
///
/// Anchors positioned exactly at the insertion offset will move according to the anchor's movement type.
/// For AnchorMovementType.Default, they will move according to the movement type specified by this parameter.
/// The caret will also move according to the parameter.
///
void Insert(int offset, ITextSource text, AnchorMovementType defaultAnchorMovementType);
///
/// Removes text.
///
/// Starting offset of the text to be removed.
/// Length of the text to be removed.
void Remove(int offset, int length);
///
/// Replaces text.
///
/// The starting offset of the text to be replaced.
/// The length of the text to be replaced.
/// The new text.
void Replace(int offset, int length, string newText);
///
/// Replaces text.
///
/// The starting offset of the text to be replaced.
/// The length of the text to be replaced.
/// The new text.
void Replace(int offset, int length, ITextSource newText);
///
/// Make the document combine the following actions into a single
/// action for undo purposes.
///
void StartUndoableAction();
///
/// Ends the undoable action started with .
///
void EndUndoableAction();
///
/// Creates an undo group. Dispose the returned value to close the undo group.
///
/// An object that closes the undo group when Dispose() is called.
IDisposable OpenUndoGroup();
///
/// Creates a new at the specified offset.
///
///
ITextAnchor CreateAnchor(int offset);
///
/// Gets the name of the file the document is stored in.
/// Could also be a non-existent dummy file name or null if no name has been set.
///
string FileName { get; }
///
/// Fired when the file name of the document changes.
///
event EventHandler FileNameChanged;
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/IDocumentLine.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Editor
{
///
/// A line inside a .
///
public interface IDocumentLine : ISegment
{
///
/// Gets the length of this line, including the line delimiter.
///
int TotalLength { get; }
///
/// Gets the length of the line terminator.
/// Returns 1 or 2; or 0 at the end of the document.
///
int DelimiterLength { get; }
///
/// Gets the number of this line.
/// The first line has the number 1.
///
int LineNumber { get; }
///
/// Gets the previous line. Returns null if this is the first line in the document.
///
IDocumentLine PreviousLine { get; }
///
/// Gets the next line. Returns null if this is the last line in the document.
///
IDocumentLine NextLine { get; }
///
/// Gets whether the line was deleted.
///
bool IsDeleted { get; }
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/ISegment.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Editor
{
///
/// An (Offset,Length)-pair.
///
public interface ISegment
{
///
/// Gets the start offset of the segment.
///
int Offset { get; }
///
/// Gets the length of the segment.
///
/// For line segments (IDocumentLine), the length does not include the line delimeter.
int Length { get; }
///
/// Gets the end offset of the segment.
///
/// EndOffset = Offset + Length;
int EndOffset { get; }
}
///
/// Extension methods for .
///
public static class ISegmentExtensions
{
///
/// Gets whether fully contains the specified segment.
///
///
/// Use segment.Contains(offset, 0) to detect whether a segment (end inclusive) contains offset;
/// use segment.Contains(offset, 1) to detect whether a segment (end exclusive) contains offset.
///
public static bool Contains (this ISegment segment, int offset, int length)
{
return segment.Offset <= offset && offset + length <= segment.EndOffset;
}
///
/// Gets whether fully contains the specified segment.
///
public static bool Contains (this ISegment thisSegment, ISegment segment)
{
return segment != null && thisSegment.Offset <= segment.Offset && segment.EndOffset <= thisSegment.EndOffset;
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/ITextAnchor.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Editor
{
///
/// The TextAnchor class references an offset (a position between two characters).
/// It automatically updates the offset when text is inserted/removed in front of the anchor.
///
///
/// Use the property to get the offset from a text anchor.
/// Use the method to create an anchor from an offset.
///
///
/// The document will automatically update all text anchors; and because it uses weak references to do so,
/// the garbage collector can simply collect the anchor object when you don't need it anymore.
///
/// Moreover, the document is able to efficiently update a large number of anchors without having to look
/// at each anchor object individually. Updating the offsets of all anchors usually only takes time logarithmic
/// to the number of anchors. Retrieving the property also runs in O(lg N).
///
///
/// Usage:
/// TextAnchor anchor = document.CreateAnchor(offset);
/// ChangeMyDocument();
/// int newOffset = anchor.Offset;
///
///
public interface ITextAnchor
{
///
/// Gets the text location of this anchor.
///
/// Thrown when trying to get the Offset from a deleted anchor.
TextLocation Location { get; }
///
/// Gets the offset of the text anchor.
///
/// Thrown when trying to get the Offset from a deleted anchor.
int Offset { get; }
///
/// Controls how the anchor moves.
///
/// Anchor movement is ambiguous if text is inserted exactly at the anchor's location.
/// Does the anchor stay before the inserted text, or does it move after it?
/// The property will be used to determine which of these two options the anchor will choose.
/// The default value is .
AnchorMovementType MovementType { get; set; }
///
///
/// Specifies whether the anchor survives deletion of the text containing it.
///
/// false: The anchor is deleted when the a selection that includes the anchor is deleted.
/// true: The anchor is not deleted.
///
///
///
bool SurviveDeletion { get; set; }
///
/// Gets whether the anchor was deleted.
///
///
/// When a piece of text containing an anchor is removed, then that anchor will be deleted.
/// First, the property is set to true on all deleted anchors,
/// then the events are raised.
/// You cannot retrieve the offset from an anchor that has been deleted.
/// This deletion behavior might be useful when using anchors for building a bookmark feature,
/// but in other cases you want to still be able to use the anchor. For those cases, set = true.
///
bool IsDeleted { get; }
///
/// Occurs after the anchor was deleted.
///
///
///
/// Due to the 'weak reference' nature of text anchors, you will receive
/// the Deleted event only while your code holds a reference to the TextAnchor object.
///
///
event EventHandler Deleted;
///
/// Gets the line number of the anchor.
///
/// Thrown when trying to get the Offset from a deleted anchor.
int Line { get; }
///
/// Gets the column number of this anchor.
///
/// Thrown when trying to get the Offset from a deleted anchor.
int Column { get; }
}
///
/// Defines how a text anchor moves.
///
public enum AnchorMovementType
{
///
/// When text is inserted at the anchor position, the type of the insertion
/// determines where the caret moves to. For normal insertions, the anchor will move
/// after the inserted text.
///
Default,
///
/// Behaves like a start marker - when text is inserted at the anchor position, the anchor will stay
/// before the inserted text.
///
BeforeInsertion,
///
/// Behave like an end marker - when text is insered at the anchor position, the anchor will move
/// after the inserted text.
///
AfterInsertion
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/ITextPasteHandler.cs
================================================
// ITextPasteHandler.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
namespace ICSharpCode.NRefactory.Editor
{
///
/// The text paste handler can do formattings to a text that is about to be pasted
/// into the text document.
///
public interface ITextPasteHandler
{
///
/// Formats plain text that is inserted at a specified offset.
///
///
/// The text that will get inserted at that position.
///
/// The offset where the text will be inserted.
/// The text to be inserted.
/// Additional data in case the text was copied from a Mono.TextEditor.
string FormatPlainText(int offset, string text, byte[] copyData);
///
/// Gets the copy data for a specific segment inside the document. This can contain additional information.
///
/// The text segment that is about to be copied.
byte[] GetCopyData(ISegment segment);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/ITextSource.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.IO;
namespace ICSharpCode.NRefactory.Editor
{
///
/// A read-only view on a (potentially mutable) text source.
/// The IDocument interface derives from this interface.
///
public interface ITextSource
{
///
/// Gets a version identifier for this text source.
/// Returns null for unversioned text sources.
///
ITextSourceVersion Version { get; }
///
/// Creates an immutable snapshot of this text source.
/// Unlike all other methods in this interface, this method is thread-safe.
///
ITextSource CreateSnapshot();
///
/// Creates an immutable snapshot of a part of this text source.
/// Unlike all other methods in this interface, this method is thread-safe.
///
ITextSource CreateSnapshot(int offset, int length);
///
/// Creates a new TextReader to read from this text source.
///
TextReader CreateReader();
///
/// Creates a new TextReader to read from this text source.
///
TextReader CreateReader(int offset, int length);
///
/// Gets the total text length.
///
/// The length of the text, in characters.
/// This is the same as Text.Length, but is more efficient because
/// it doesn't require creating a String object.
int TextLength { get; }
///
/// Gets the whole text as string.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
string Text { get; }
///
/// Gets a character at the specified position in the document.
///
/// The index of the character to get.
/// Offset is outside the valid range (0 to TextLength-1).
/// The character at the specified position.
/// This is the same as Text[offset], but is more efficient because
/// it doesn't require creating a String object.
char GetCharAt(int offset);
///
/// Retrieves the text for a portion of the document.
///
/// offset or length is outside the valid range.
/// This is the same as Text.Substring, but is more efficient because
/// it doesn't require creating a String object for the whole document.
string GetText(int offset, int length);
///
/// Retrieves the text for a portion of the document.
///
/// offset or length is outside the valid range.
string GetText(ISegment segment);
///
/// Writes the text from this document into the TextWriter.
///
void WriteTextTo(TextWriter writer);
///
/// Writes the text from this document into the TextWriter.
///
void WriteTextTo(TextWriter writer, int offset, int length);
///
/// Gets the index of the first occurrence of the character in the specified array.
///
/// Character to search for
/// Start index of the area to search.
/// Length of the area to search.
/// The first index where the character was found; or -1 if no occurrence was found.
int IndexOf(char c, int startIndex, int count);
///
/// Gets the index of the first occurrence of any character in the specified array.
///
/// Characters to search for
/// Start index of the area to search.
/// Length of the area to search.
/// The first index where any character was found; or -1 if no occurrence was found.
int IndexOfAny(char[] anyOf, int startIndex, int count);
///
/// Gets the index of the first occurrence of the specified search text in this text source.
///
/// The search text
/// Start index of the area to search.
/// Length of the area to search.
/// String comparison to use.
/// The first index where the search term was found; or -1 if no occurrence was found.
int IndexOf(string searchText, int startIndex, int count, StringComparison comparisonType);
///
/// Gets the index of the last occurrence of the specified character in this text source.
///
/// The search character
/// Start index of the area to search.
/// Length of the area to search.
/// The last index where the search term was found; or -1 if no occurrence was found.
/// The search proceeds backwards from (startIndex+count) to startIndex.
/// This is different than the meaning of the parameters on string.LastIndexOf!
int LastIndexOf(char c, int startIndex, int count);
///
/// Gets the index of the last occurrence of the specified search text in this text source.
///
/// The search text
/// Start index of the area to search.
/// Length of the area to search.
/// String comparison to use.
/// The last index where the search term was found; or -1 if no occurrence was found.
/// The search proceeds backwards from (startIndex+count) to startIndex.
/// This is different than the meaning of the parameters on string.LastIndexOf!
int LastIndexOf(string searchText, int startIndex, int count, StringComparison comparisonType);
/* What about:
void Insert (int offset, string value);
void Remove (int offset, int count);
void Remove (ISegment segment);
void Replace (int offset, int count, string value);
Or more search operations:
IEnumerable SearchForward (string pattern, int startIndex);
IEnumerable SearchForwardIgnoreCase (string pattern, int startIndex);
IEnumerable SearchBackward (string pattern, int startIndex);
IEnumerable SearchBackwardIgnoreCase (string pattern, int startIndex);
*/
}
///
/// Represents a version identifier for a text source.
///
///
/// Verions can be used to efficiently detect whether a document has changed and needs reparsing;
/// or even to implement incremental parsers.
/// It is a separate class from ITextSource to allow the GC to collect the text source while
/// the version checkpoint is still in use.
///
public interface ITextSourceVersion
{
///
/// Gets whether this checkpoint belongs to the same document as the other checkpoint.
///
///
/// Returns false when given null.
///
bool BelongsToSameDocumentAs(ITextSourceVersion other);
///
/// Compares the age of this checkpoint to the other checkpoint.
///
/// This method is thread-safe.
/// Raised if 'other' belongs to a different document than this version.
/// -1 if this version is older than .
/// 0 if this version instance represents the same version as .
/// 1 if this version is newer than .
int CompareAge(ITextSourceVersion other);
///
/// Gets the changes from this checkpoint to the other checkpoint.
/// If 'other' is older than this checkpoint, reverse changes are calculated.
///
/// This method is thread-safe.
/// Raised if 'other' belongs to a different document than this checkpoint.
IEnumerable GetChangesTo(ITextSourceVersion other);
///
/// Calculates where the offset has moved in the other buffer version.
///
/// Raised if 'other' belongs to a different document than this checkpoint.
int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement = AnchorMovementType.Default);
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
namespace ICSharpCode.NRefactory.Editor
{
///
/// Read-only implementation of .
///
[Serializable]
public sealed class ReadOnlyDocument : IDocument
{
readonly ITextSource textSource;
readonly string fileName;
int[] lines;
static readonly char[] newline = { '\r', '\n' };
///
/// Creates a new ReadOnlyDocument from the given text source.
///
public ReadOnlyDocument(ITextSource textSource)
{
if (textSource == null)
throw new ArgumentNullException("textSource");
// ensure that underlying buffer is immutable
this.textSource = textSource.CreateSnapshot();
List lines = new List();
lines.Add(0);
int offset = 0;
int textLength = textSource.TextLength;
while ((offset = textSource.IndexOfAny(newline, offset, textLength - offset)) >= 0) {
offset++;
if (textSource.GetCharAt(offset - 1) == '\r' && offset < textLength && textSource.GetCharAt(offset) == '\n') {
offset++;
}
lines.Add(offset);
}
this.lines = lines.ToArray();
}
///
/// Creates a new ReadOnlyDocument from the given string.
///
public ReadOnlyDocument(string text)
: this(new StringTextSource(text))
{
}
///
/// Creates a new ReadOnlyDocument from the given text source;
/// and sets IDocument.FileName to the specified file name.
///
public ReadOnlyDocument(ITextSource textSource, string fileName)
: this(textSource)
{
this.fileName = fileName;
}
///
public IDocumentLine GetLineByNumber(int lineNumber)
{
if (lineNumber < 1 || lineNumber > lines.Length)
throw new ArgumentOutOfRangeException("lineNumber", lineNumber, "Value must be between 1 and " + lines.Length);
return new ReadOnlyDocumentLine(this, lineNumber);
}
sealed class ReadOnlyDocumentLine : IDocumentLine
{
readonly ReadOnlyDocument doc;
readonly int lineNumber;
readonly int offset, endOffset;
public ReadOnlyDocumentLine(ReadOnlyDocument doc, int lineNumber)
{
this.doc = doc;
this.lineNumber = lineNumber;
this.offset = doc.GetStartOffset(lineNumber);
this.endOffset = doc.GetEndOffset(lineNumber);
}
public override int GetHashCode()
{
return doc.GetHashCode() ^ lineNumber;
}
public override bool Equals(object obj)
{
ReadOnlyDocumentLine other = obj as ReadOnlyDocumentLine;
return other != null && doc == other.doc && lineNumber == other.lineNumber;
}
public int Offset {
get { return offset; }
}
public int Length {
get { return endOffset - offset; }
}
public int EndOffset {
get { return endOffset; }
}
public int TotalLength {
get {
return doc.GetTotalEndOffset(lineNumber) - offset;
}
}
public int DelimiterLength {
get {
return doc.GetTotalEndOffset(lineNumber) - endOffset;
}
}
public int LineNumber {
get { return lineNumber; }
}
public IDocumentLine PreviousLine {
get {
if (lineNumber == 1)
return null;
else
return new ReadOnlyDocumentLine(doc, lineNumber - 1);
}
}
public IDocumentLine NextLine {
get {
if (lineNumber == doc.LineCount)
return null;
else
return new ReadOnlyDocumentLine(doc, lineNumber + 1);
}
}
public bool IsDeleted {
get { return false; }
}
}
int GetStartOffset(int lineNumber)
{
return lines[lineNumber-1];
}
int GetTotalEndOffset(int lineNumber)
{
return lineNumber < lines.Length ? lines[lineNumber] : textSource.TextLength;
}
int GetEndOffset(int lineNumber)
{
if (lineNumber == lines.Length)
return textSource.TextLength;
int off = lines[lineNumber] - 1;
if (off > 0 && textSource.GetCharAt(off - 1) == '\r' && textSource.GetCharAt(off) == '\n')
off--;
return off;
}
///
public IDocumentLine GetLineByOffset(int offset)
{
return GetLineByNumber(GetLineNumberForOffset(offset));
}
int GetLineNumberForOffset(int offset)
{
int r = Array.BinarySearch(lines, offset);
return r < 0 ? ~r : r + 1;
}
///
public int GetOffset(int line, int column)
{
if (line < 1 || line > lines.Length)
throw new ArgumentOutOfRangeException("line", line, "Value must be between 1 and " + lines.Length);
int lineStart = GetStartOffset(line);
if (column <= 1)
return lineStart;
int lineEnd = GetEndOffset(line);
if (column - 1 >= lineEnd - lineStart)
return lineEnd;
return lineStart + column - 1;
}
///
public int GetOffset(TextLocation location)
{
return GetOffset(location.Line, location.Column);
}
///
public TextLocation GetLocation(int offset)
{
if (offset < 0 || offset > textSource.TextLength)
throw new ArgumentOutOfRangeException("offset", offset, "Value must be between 0 and " + textSource.TextLength);
int line = GetLineNumberForOffset(offset);
return new TextLocation(line, offset-GetStartOffset(line)+1);
}
///
public string Text {
get { return textSource.Text; }
set {
throw new NotSupportedException();
}
}
///
public int LineCount {
get { return lines.Length; }
}
///
public ITextSourceVersion Version {
get { return textSource.Version; }
}
///
public int TextLength {
get { return textSource.TextLength; }
}
event EventHandler IDocument.TextChanging { add {} remove {} }
event EventHandler IDocument.TextChanged { add {} remove {} }
event EventHandler IDocument.ChangeCompleted { add {} remove {} }
void IDocument.Insert(int offset, string text)
{
throw new NotSupportedException();
}
void IDocument.Insert(int offset, string text, AnchorMovementType defaultAnchorMovementType)
{
throw new NotSupportedException();
}
void IDocument.Remove(int offset, int length)
{
throw new NotSupportedException();
}
void IDocument.Replace(int offset, int length, string newText)
{
throw new NotSupportedException();
}
void IDocument.Insert(int offset, ITextSource text)
{
throw new NotSupportedException();
}
void IDocument.Insert(int offset, ITextSource text, AnchorMovementType defaultAnchorMovementType)
{
throw new NotSupportedException();
}
void IDocument.Replace(int offset, int length, ITextSource newText)
{
throw new NotSupportedException();
}
void IDocument.StartUndoableAction()
{
}
void IDocument.EndUndoableAction()
{
}
IDisposable IDocument.OpenUndoGroup()
{
return null;
}
///
public ITextAnchor CreateAnchor(int offset)
{
return new ReadOnlyDocumentTextAnchor(GetLocation(offset), offset);
}
sealed class ReadOnlyDocumentTextAnchor : ITextAnchor
{
readonly TextLocation location;
readonly int offset;
public ReadOnlyDocumentTextAnchor(TextLocation location, int offset)
{
this.location = location;
this.offset = offset;
}
public event EventHandler Deleted { add {} remove {} }
public TextLocation Location {
get { return location; }
}
public int Offset {
get { return offset; }
}
public AnchorMovementType MovementType { get; set; }
public bool SurviveDeletion { get; set; }
public bool IsDeleted {
get { return false; }
}
public int Line {
get { return location.Line; }
}
public int Column {
get { return location.Column; }
}
}
///
public ITextSource CreateSnapshot()
{
return textSource; // textBuffer is immutable
}
///
public ITextSource CreateSnapshot(int offset, int length)
{
return textSource.CreateSnapshot(offset, length);
}
///
public IDocument CreateDocumentSnapshot()
{
return this; // ReadOnlyDocument is immutable
}
///
public System.IO.TextReader CreateReader()
{
return textSource.CreateReader();
}
///
public System.IO.TextReader CreateReader(int offset, int length)
{
return textSource.CreateReader(offset, length);
}
///
public void WriteTextTo(System.IO.TextWriter writer)
{
textSource.WriteTextTo(writer);
}
///
public void WriteTextTo(System.IO.TextWriter writer, int offset, int length)
{
textSource.WriteTextTo(writer, offset, length);
}
///
public char GetCharAt(int offset)
{
return textSource.GetCharAt(offset);
}
///
public string GetText(int offset, int length)
{
return textSource.GetText(offset, length);
}
///
public string GetText(ISegment segment)
{
return textSource.GetText(segment);
}
///
public int IndexOf(char c, int startIndex, int count)
{
return textSource.IndexOf(c, startIndex, count);
}
///
public int IndexOfAny(char[] anyOf, int startIndex, int count)
{
return textSource.IndexOfAny(anyOf, startIndex, count);
}
///
public int IndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return textSource.IndexOf(searchText, startIndex, count, comparisonType);
}
///
public int LastIndexOf(char c, int startIndex, int count)
{
return textSource.LastIndexOf(c, startIndex, count);
}
///
public int LastIndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return textSource.LastIndexOf(searchText, startIndex, count, comparisonType);
}
object IServiceProvider.GetService(Type serviceType)
{
return null;
}
///
/// Will never be raised on .
public event EventHandler FileNameChanged { add {} remove {} }
///
public string FileName {
get { return fileName; }
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/StringBuilderDocument.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using ICSharpCode.NRefactory.Utils;
namespace ICSharpCode.NRefactory.Editor
{
///
/// Document based on a string builder.
/// This class serves as a reference implementation for the IDocument interface.
///
public class StringBuilderDocument : IDocument
{
readonly StringBuilder b;
readonly TextSourceVersionProvider versionProvider = new TextSourceVersionProvider();
///
/// Creates a new StringBuilderDocument.
///
public StringBuilderDocument()
{
b = new StringBuilder();
}
///
/// Creates a new StringBuilderDocument with the specified initial text.
///
public StringBuilderDocument(string text)
{
if (text == null)
throw new ArgumentNullException("text");
b = new StringBuilder(text);
}
///
/// Creates a new StringBuilderDocument with the initial text copied from the specified text source.
///
public StringBuilderDocument(ITextSource textSource)
{
if (textSource == null)
throw new ArgumentNullException("textSource");
b = new StringBuilder(textSource.TextLength);
textSource.WriteTextTo(new StringWriter(b));
}
///
public event EventHandler TextChanging;
///
public event EventHandler TextChanged;
///
public event EventHandler ChangeCompleted;
///
public ITextSourceVersion Version {
get { return versionProvider.CurrentVersion; }
}
#region Line<->Offset
///
public int LineCount {
get { return CreateDocumentSnapshot().LineCount; }
}
///
public IDocumentLine GetLineByNumber(int lineNumber)
{
return CreateDocumentSnapshot().GetLineByNumber(lineNumber);
}
///
public IDocumentLine GetLineByOffset(int offset)
{
return CreateDocumentSnapshot().GetLineByOffset(offset);
}
///
public int GetOffset(int line, int column)
{
return CreateDocumentSnapshot().GetOffset(line, column);
}
///
public int GetOffset(TextLocation location)
{
return CreateDocumentSnapshot().GetOffset(location);
}
///
public TextLocation GetLocation(int offset)
{
return CreateDocumentSnapshot().GetLocation(offset);
}
#endregion
#region Insert/Remove/Replace
///
public void Insert(int offset, string text)
{
Replace(offset, 0, text);
}
///
public void Insert(int offset, ITextSource text)
{
if (text == null)
throw new ArgumentNullException("text");
Replace(offset, 0, text.Text);
}
///
public void Insert(int offset, string text, AnchorMovementType defaultAnchorMovementType)
{
if (offset < 0 || offset > this.TextLength)
throw new ArgumentOutOfRangeException("offset");
if (text == null)
throw new ArgumentNullException("text");
if (defaultAnchorMovementType == AnchorMovementType.BeforeInsertion)
PerformChange(new InsertionWithMovementBefore(offset, text));
else
Replace(offset, 0, text);
}
///
public void Insert(int offset, ITextSource text, AnchorMovementType defaultAnchorMovementType)
{
if (text == null)
throw new ArgumentNullException("text");
Insert(offset, text.Text, defaultAnchorMovementType);
}
[Serializable]
sealed class InsertionWithMovementBefore : TextChangeEventArgs
{
public InsertionWithMovementBefore(int offset, string newText) : base(offset, string.Empty, newText)
{
}
public override int GetNewOffset(int offset, AnchorMovementType movementType)
{
if (offset == this.Offset && movementType == AnchorMovementType.Default)
return offset;
else
return base.GetNewOffset(offset, movementType);
}
}
///
public void Remove(int offset, int length)
{
Replace(offset, length, string.Empty);
}
///
public void Replace(int offset, int length, string newText)
{
if (offset < 0 || offset > this.TextLength)
throw new ArgumentOutOfRangeException("offset");
if (length < 0 || length > this.TextLength - offset)
throw new ArgumentOutOfRangeException("length");
if (newText == null)
throw new ArgumentNullException("newText");
PerformChange(new TextChangeEventArgs(offset, b.ToString(offset, length), newText));
}
///
public void Replace(int offset, int length, ITextSource newText)
{
if (newText == null)
throw new ArgumentNullException("newText");
Replace(offset, length, newText.Text);
}
bool isInChange;
void PerformChange(TextChangeEventArgs change)
{
// Ensure that all changes take place inside an update group.
// Will also take care of throwing an exception if isInChange is set.
StartUndoableAction();
try {
isInChange = true;
try {
if (TextChanging != null)
TextChanging(this, change);
// Perform changes to document and Version property
documentSnapshot = null;
cachedText = null;
b.Remove(change.Offset, change.RemovalLength);
b.Insert(change.Offset, change.InsertedText.Text);
versionProvider.AppendChange(change);
// Update anchors and fire Deleted events
UpdateAnchors(change);
if (TextChanged != null)
TextChanged(this, change);
} finally {
isInChange = false;
}
} finally {
EndUndoableAction();
}
}
#endregion
#region Undo
int undoGroupNesting = 0;
///
public void StartUndoableAction()
{
// prevent changes from within the TextChanging/TextChanged event handlers
if (isInChange)
throw new InvalidOperationException();
undoGroupNesting++;
}
///
public void EndUndoableAction()
{
undoGroupNesting--;
if (undoGroupNesting == 0) {
if (ChangeCompleted != null)
ChangeCompleted(this, EventArgs.Empty);
}
}
///
public IDisposable OpenUndoGroup()
{
StartUndoableAction();
return new CallbackOnDispose(EndUndoableAction);
}
#endregion
#region CreateSnapshot/CreateReader
ReadOnlyDocument documentSnapshot;
///
public IDocument CreateDocumentSnapshot()
{
if (documentSnapshot == null)
documentSnapshot = new ReadOnlyDocument(this, this.FileName);
return documentSnapshot;
}
///
public ITextSource CreateSnapshot()
{
return new StringTextSource(this.Text, versionProvider.CurrentVersion);
}
///
public ITextSource CreateSnapshot(int offset, int length)
{
return new StringTextSource(GetText(offset, length));
}
///
public TextReader CreateReader()
{
return new StringReader(this.Text);
}
///
public TextReader CreateReader(int offset, int length)
{
return new StringReader(GetText(offset, length));
}
///
public void WriteTextTo(TextWriter writer)
{
if (writer == null)
throw new ArgumentNullException("writer");
writer.Write(this.Text);
}
///
public void WriteTextTo(TextWriter writer, int offset, int length)
{
if (writer == null)
throw new ArgumentNullException("writer");
writer.Write(GetText(offset, length));
}
#endregion
#region GetText / IndexOf
string cachedText;
///
public string Text {
get {
if (cachedText == null)
cachedText = b.ToString();
return cachedText;
}
set {
Replace(0, b.Length, value);
}
}
///
public int TextLength {
get { return b.Length; }
}
///
public char GetCharAt(int offset)
{
return b[offset];
}
///
public string GetText(int offset, int length)
{
return b.ToString(offset, length);
}
///
public string GetText(ISegment segment)
{
if (segment == null)
throw new ArgumentNullException("segment");
return b.ToString(segment.Offset, segment.Length);
}
///
public int IndexOf(char c, int startIndex, int count)
{
return this.Text.IndexOf(c, startIndex, count);
}
///
public int IndexOfAny(char[] anyOf, int startIndex, int count)
{
return this.Text.IndexOfAny(anyOf, startIndex, count);
}
///
public int IndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return this.Text.IndexOf(searchText, startIndex, count, comparisonType);
}
///
public int LastIndexOf(char c, int startIndex, int count)
{
return this.Text.LastIndexOf(c, startIndex + count - 1, count);
}
///
public int LastIndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return this.Text.LastIndexOf(searchText, startIndex + count - 1, count, comparisonType);
}
#endregion
#region CreateAnchor
readonly List anchors = new List();
///
public ITextAnchor CreateAnchor(int offset)
{
var newAnchor = new SimpleAnchor(this, offset);
for (int i = 0; i < anchors.Count; i++) {
if (!anchors[i].IsAlive)
anchors[i] = new WeakReference(newAnchor);
}
anchors.Add(new WeakReference(newAnchor));
return newAnchor;
}
void UpdateAnchors(TextChangeEventArgs change)
{
// First update all anchors, then fire the deleted events.
List deletedAnchors = new List();
for (int i = 0; i < anchors.Count; i++) {
var anchor = anchors[i].Target as SimpleAnchor;
if (anchor != null) {
anchor.Update(change);
if (anchor.IsDeleted)
deletedAnchors.Add(i);
}
}
deletedAnchors.Reverse();
foreach (var index in deletedAnchors) {
var anchor = anchors[index].Target as SimpleAnchor;
if (anchor != null)
anchor.RaiseDeletedEvent();
anchors.RemoveAt(index);
}
}
sealed class SimpleAnchor : ITextAnchor
{
readonly StringBuilderDocument document;
int offset;
public SimpleAnchor(StringBuilderDocument document, int offset)
{
this.document = document;
this.offset = offset;
}
public event EventHandler Deleted;
public TextLocation Location {
get {
if (IsDeleted)
throw new InvalidOperationException();
return document.GetLocation(offset);
}
}
public int Offset {
get {
if (IsDeleted)
throw new InvalidOperationException();
return offset;
}
}
public AnchorMovementType MovementType { get; set; }
public bool SurviveDeletion { get; set; }
public bool IsDeleted {
get { return offset < 0; }
}
public void Update(TextChangeEventArgs change)
{
if (SurviveDeletion || offset <= change.Offset || offset >= change.Offset + change.RemovalLength) {
offset = change.GetNewOffset(offset, MovementType);
} else {
offset = -1;
}
}
public void RaiseDeletedEvent()
{
if (Deleted != null)
Deleted(this, EventArgs.Empty);
}
public int Line {
get { return this.Location.Line; }
}
public int Column {
get { return this.Location.Column; }
}
}
#endregion
///
public virtual object GetService(Type serviceType)
{
return null;
}
///
public virtual event EventHandler FileNameChanged { add {} remove {} }
///
public virtual string FileName {
get { return string.Empty; }
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/StringTextSource.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.IO;
namespace ICSharpCode.NRefactory.Editor
{
///
/// Implements the ITextSource interface using a string.
///
[Serializable]
public class StringTextSource : ITextSource
{
///
/// Gets a text source containing the empty string.
///
public static readonly StringTextSource Empty = new StringTextSource(string.Empty);
readonly string text;
readonly ITextSourceVersion version;
///
/// Creates a new StringTextSource with the given text.
///
public StringTextSource(string text)
{
if (text == null)
throw new ArgumentNullException("text");
this.text = text;
}
///
/// Creates a new StringTextSource with the given text.
///
public StringTextSource(string text, ITextSourceVersion version)
{
if (text == null)
throw new ArgumentNullException("text");
this.text = text;
this.version = version;
}
///
public ITextSourceVersion Version {
get { return version; }
}
///
public int TextLength {
get { return text.Length; }
}
///
public string Text {
get { return text; }
}
///
public ITextSource CreateSnapshot()
{
return this; // StringTextSource is immutable
}
///
public ITextSource CreateSnapshot(int offset, int length)
{
return new StringTextSource(text.Substring(offset, length));
}
///
public TextReader CreateReader()
{
return new StringReader(text);
}
///
public TextReader CreateReader(int offset, int length)
{
return new StringReader(text.Substring(offset, length));
}
///
public void WriteTextTo(TextWriter writer)
{
writer.Write(text);
}
///
public void WriteTextTo(TextWriter writer, int offset, int length)
{
writer.Write(text.Substring(offset, length));
}
///
public char GetCharAt(int offset)
{
return text[offset];
}
///
public string GetText(int offset, int length)
{
return text.Substring(offset, length);
}
///
public string GetText(ISegment segment)
{
if (segment == null)
throw new ArgumentNullException("segment");
return text.Substring(segment.Offset, segment.Length);
}
///
public int IndexOf(char c, int startIndex, int count)
{
return text.IndexOf(c, startIndex, count);
}
///
public int IndexOfAny(char[] anyOf, int startIndex, int count)
{
return text.IndexOfAny(anyOf, startIndex, count);
}
///
public int IndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return text.IndexOf(searchText, startIndex, count, comparisonType);
}
///
public int LastIndexOf(char c, int startIndex, int count)
{
return text.LastIndexOf(c, startIndex + count - 1, count);
}
///
public int LastIndexOf(string searchText, int startIndex, int count, StringComparison comparisonType)
{
return text.LastIndexOf(searchText, startIndex + count - 1, count, comparisonType);
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/TextChangeEventArgs.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory.Editor
{
///
/// Describes a change of the document text.
/// This class is thread-safe.
///
[Serializable]
public class TextChangeEventArgs : EventArgs
{
readonly int offset;
readonly ITextSource removedText;
readonly ITextSource insertedText;
///
/// The offset at which the change occurs.
///
public int Offset {
get { return offset; }
}
///
/// The text that was removed.
///
public ITextSource RemovedText {
get { return removedText; }
}
///
/// The number of characters removed.
///
public int RemovalLength {
get { return removedText.TextLength; }
}
///
/// The text that was inserted.
///
public ITextSource InsertedText {
get { return insertedText; }
}
///
/// The number of characters inserted.
///
public int InsertionLength {
get { return insertedText.TextLength; }
}
///
/// Creates a new TextChangeEventArgs object.
///
public TextChangeEventArgs(int offset, string removedText, string insertedText)
{
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "offset must not be negative");
this.offset = offset;
this.removedText = removedText != null ? new StringTextSource(removedText) : StringTextSource.Empty;
this.insertedText = insertedText != null ? new StringTextSource(insertedText) : StringTextSource.Empty;
}
///
/// Creates a new TextChangeEventArgs object.
///
public TextChangeEventArgs(int offset, ITextSource removedText, ITextSource insertedText)
{
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "offset must not be negative");
this.offset = offset;
this.removedText = removedText ?? StringTextSource.Empty;
this.insertedText = insertedText ?? StringTextSource.Empty;
}
///
/// Gets the new offset where the specified offset moves after this document change.
///
public virtual int GetNewOffset(int offset, AnchorMovementType movementType = AnchorMovementType.Default)
{
if (offset >= this.Offset && offset <= this.Offset + this.RemovalLength) {
if (movementType == AnchorMovementType.BeforeInsertion)
return this.Offset;
else
return this.Offset + this.InsertionLength;
} else if (offset > this.Offset) {
return offset + this.InsertionLength - this.RemovalLength;
} else {
return offset;
}
}
///
/// Creates TextChangeEventArgs for the reverse change.
///
public virtual TextChangeEventArgs Invert()
{
return new TextChangeEventArgs(offset, insertedText, removedText);
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/TextSourceVersionProvider.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace ICSharpCode.NRefactory.Editor
{
///
/// Provides ITextSourceVersion instances.
///
public class TextSourceVersionProvider
{
Version currentVersion;
public TextSourceVersionProvider()
{
this.currentVersion = new Version(this);
}
///
/// Gets the current version.
///
public ITextSourceVersion CurrentVersion {
get { return currentVersion; }
}
///
/// Replaces the current version with a new version.
///
/// Change from current version to new version
public void AppendChange(TextChangeEventArgs change)
{
if (change == null)
throw new ArgumentNullException("change");
currentVersion.change = change;
currentVersion.next = new Version(currentVersion);
currentVersion = currentVersion.next;
}
[DebuggerDisplay("Version #{id}")]
sealed class Version : ITextSourceVersion
{
// Reference back to the provider.
// Used to determine if two checkpoints belong to the same document.
readonly TextSourceVersionProvider provider;
// ID used for CompareAge()
readonly int id;
// the change from this version to the next version
internal TextChangeEventArgs change;
internal Version next;
internal Version(TextSourceVersionProvider provider)
{
this.provider = provider;
}
internal Version(Version prev)
{
this.provider = prev.provider;
this.id = unchecked( prev.id + 1 );
}
public bool BelongsToSameDocumentAs(ITextSourceVersion other)
{
Version o = other as Version;
return o != null && provider == o.provider;
}
public int CompareAge(ITextSourceVersion other)
{
if (other == null)
throw new ArgumentNullException("other");
Version o = other as Version;
if (o == null || provider != o.provider)
throw new ArgumentException("Versions do not belong to the same document.");
// We will allow overflows, but assume that the maximum distance between checkpoints is 2^31-1.
// This is guaranteed on x86 because so many checkpoints don't fit into memory.
return Math.Sign(unchecked( this.id - o.id ));
}
public IEnumerable GetChangesTo(ITextSourceVersion other)
{
int result = CompareAge(other);
Version o = (Version)other;
if (result < 0)
return GetForwardChanges(o);
else if (result > 0)
return o.GetForwardChanges(this).Reverse().Select(change => change.Invert());
else
return EmptyList.Instance;
}
IEnumerable GetForwardChanges(Version other)
{
// Return changes from this(inclusive) to other(exclusive).
for (Version node = this; node != other; node = node.next) {
yield return node.change;
}
}
public int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement)
{
int offset = oldOffset;
foreach (var e in GetChangesTo(other)) {
offset = e.GetNewOffset(offset, movement);
}
return offset;
}
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/Editor/UnicodeNewline.cs
================================================
//
// UnicodeNewline.cs
//
// Author:
// Mike Krüger
//
// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
namespace ICSharpCode.NRefactory
{
public enum UnicodeNewline {
Unknown,
///
/// Line Feed, U+000A
///
LF = 0x0A,
CRLF = 0x0D0A,
///
/// Carriage Return, U+000D
///
CR = 0x0D,
///
/// Next Line, U+0085
///
NEL = 0x85,
///
/// Vertical Tab, U+000B
///
VT = 0x0B,
///
/// Form Feed, U+000C
///
FF = 0x0C,
///
/// Line Separator, U+2028
///
LS = 0x2028,
///
/// Paragraph Separator, U+2029
///
PS = 0x2029
}
///
/// Defines unicode new lines according to Unicode Technical Report #13
/// http://www.unicode.org/standard/reports/tr13/tr13-5.html
///
public static class NewLine
{
///
/// Carriage Return, U+000D
///
public const char CR = (char)0x0D;
///
/// Line Feed, U+000A
///
public const char LF = (char)0x0A;
///
/// Next Line, U+0085
///
public const char NEL = (char)0x85;
///
/// Vertical Tab, U+000B
///
public const char VT = (char)0x0B;
///
/// Form Feed, U+000C
///
public const char FF = (char)0x0C;
///
/// Line Separator, U+2028
///
public const char LS = (char)0x2028;
///
/// Paragraph Separator, U+2029
///
public const char PS = (char)0x2029;
///
/// Determines if a char is a new line delimiter.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// A callback getting the next character (may be null).
public static int GetDelimiterLength (char curChar, Func nextChar = null)
{
if (curChar == CR) {
if (nextChar != null && nextChar () == LF)
return 2;
return 1;
}
if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
return 1;
return 0;
}
///
/// Determines if a char is a new line delimiter.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// The next character (if != LF then length will always be 0 or 1).
public static int GetDelimiterLength (char curChar, char nextChar)
{
if (curChar == CR) {
if (nextChar == LF)
return 2;
return 1;
}
if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
return 1;
return 0;
}
///
/// Determines if a char is a new line delimiter.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// The length of the delimiter
/// The type of the delimiter
/// A callback getting the next character (may be null).
public static bool TryGetDelimiterLengthAndType (char curChar, out int length, out UnicodeNewline type, Func nextChar = null)
{
if (curChar == CR) {
if (nextChar != null && nextChar () == LF) {
length = 2;
type = UnicodeNewline.CRLF;
} else {
length = 1;
type = UnicodeNewline.CR;
}
return true;
}
switch (curChar) {
case LF:
type = UnicodeNewline.LF;
length = 1;
return true;
case NEL:
type = UnicodeNewline.NEL;
length = 1;
return true;
case VT:
type = UnicodeNewline.VT;
length = 1;
return true;
case FF:
type = UnicodeNewline.FF;
length = 1;
return true;
case LS:
type = UnicodeNewline.LS;
length = 1;
return true;
case PS:
type = UnicodeNewline.PS;
length = 1;
return true;
}
length = -1;
type = UnicodeNewline.Unknown;
return false;
}
///
/// Determines if a char is a new line delimiter.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// The length of the delimiter
/// The type of the delimiter
/// The next character (if != LF then length will always be 0 or 1).
public static bool TryGetDelimiterLengthAndType (char curChar, out int length, out UnicodeNewline type, char nextChar)
{
if (curChar == CR) {
if (nextChar == LF) {
length = 2;
type = UnicodeNewline.CRLF;
} else {
length = 1;
type = UnicodeNewline.CR;
}
return true;
}
switch (curChar) {
case LF:
type = UnicodeNewline.LF;
length = 1;
return true;
case NEL:
type = UnicodeNewline.NEL;
length = 1;
return true;
case VT:
type = UnicodeNewline.VT;
length = 1;
return true;
case FF:
type = UnicodeNewline.FF;
length = 1;
return true;
case LS:
type = UnicodeNewline.LS;
length = 1;
return true;
case PS:
type = UnicodeNewline.PS;
length = 1;
return true;
}
length = -1;
type = UnicodeNewline.Unknown;
return false;
}
///
/// Gets the new line type of a given char/next char.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// A callback getting the next character (may be null).
public static UnicodeNewline GetDelimiterType (char curChar, Func nextChar = null)
{
switch (curChar) {
case CR:
if (nextChar != null && nextChar () == LF)
return UnicodeNewline.CRLF;
return UnicodeNewline.CR;
case LF:
return UnicodeNewline.LF;
case NEL:
return UnicodeNewline.NEL;
case VT:
return UnicodeNewline.VT;
case FF:
return UnicodeNewline.FF;
case LS:
return UnicodeNewline.LS;
case PS:
return UnicodeNewline.PS;
}
return UnicodeNewline.Unknown;
}
///
/// Gets the new line type of a given char/next char.
///
/// 0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.
/// The current character.
/// The next character (if != LF then length will always be 0 or 1).
public static UnicodeNewline GetDelimiterType (char curChar, char nextChar)
{
switch (curChar) {
case CR:
if (nextChar == LF)
return UnicodeNewline.CRLF;
return UnicodeNewline.CR;
case LF:
return UnicodeNewline.LF;
case NEL:
return UnicodeNewline.NEL;
case VT:
return UnicodeNewline.VT;
case FF:
return UnicodeNewline.FF;
case LS:
return UnicodeNewline.LS;
case PS:
return UnicodeNewline.PS;
}
return UnicodeNewline.Unknown;
}
///
/// Determines if a char is a new line delimiter.
///
/// Note that the only 2 char wide new line is CR LF and both chars are new line
/// chars on their own. For most cases GetDelimiterLength is the better choice.
///
public static bool IsNewLine(char ch)
{
return
ch == NewLine.CR ||
ch == NewLine.LF ||
ch == NewLine.NEL ||
ch == NewLine.VT ||
ch == NewLine.FF ||
ch == NewLine.LS ||
ch == NewLine.PS;
}
///
/// Gets the new line as a string.
///
public static string GetString (UnicodeNewline newLine)
{
switch (newLine) {
case UnicodeNewline.Unknown:
return "";
case UnicodeNewline.LF:
return "\n";
case UnicodeNewline.CRLF:
return "\r\n";
case UnicodeNewline.CR:
return "\r";
case UnicodeNewline.NEL:
return "\u0085";
case UnicodeNewline.VT:
return "\u000B";
case UnicodeNewline.FF:
return "\u000C";
case UnicodeNewline.LS:
return "\u2028";
case UnicodeNewline.PS:
return "\u2029";
default:
throw new ArgumentOutOfRangeException ();
}
}
}
}
================================================
FILE: 3rdparty/NRefactory/ICSharpCode.NRefactory/IAnnotatable.cs
================================================
// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace ICSharpCode.NRefactory
{
///
/// Provides an interface to handle annotations in an object.
///
public interface IAnnotatable
{
///
/// Gets all annotations stored on this IAnnotatable.
///
IEnumerable