Found 20 packages
Create your own custom, rich C# mixins with Cilador! Mixins are the perfect DRY solution for sharing code without abusing inheritance. Supports: Mixins containing fields, methods, properties, events, and nested types. Generics mixins and mixin members, so long as the top-level mixin implementation is closed. (Members and nested types can be open.) Public, private, protected, internal, and protected internal members. Static members. Custom attributes on members. Virtual members. Abstract nested types and abstract members within these nested types. Generic nested types and generic members. Parameterless constructors for mixin implementations. Type initializers (i.e. static constructors) in mixin implementations Unsupported: Parameters on mixin implemenation constructors. Unmanaged code calls (extern) Security attributes Mixins implementing multiple interfaces Mixins with base types other than object Value type mixins Unhandled: Naming collisions Please consider this version of Cilador.Fody to be pre-release.
This library provides helpers and extensions on top of Windows Composition and XAML storyboards. It is a part of the Windows Community Toolkit. Namespace: - CompositionAnimations: - Animations: AnimationBase, OffsetAnimation, OpacityAnimation, RotationAnimation, RotationInDegreesAnimation, ScalarAnimation, ScaleAnimation, TranslationAnimation, TypedAnimationBase, Vector2Animation, Vector3Animation, Vector4Animation - CompositionAnimations: ExpressionKeyFrame, KeyFrame, KeyFrameCollection, ScalarKeyFrame, TypedKeyFrame, Vector2KeyFrame, Vector3KeyFrame, Vector4KeyFrame - ConnectedAnimations: Connected, ConnectedAnimationHelper, ConnectedAnimationListProperty, ConnectedAnimationProperties - Expressions: ExpressionNodes, ExpressionValues, ReferenceNodes, CompositionExtensions, ExpressionFunctions, OperationType - AnimationExtensions: Blur, Fade, Light, Offset, Rotate, Saturation, Scale
Embrace delegation, composition over inheritance, and mix-in style coding in C# by adopting the implementations of members in your class. TypeAdoption will automatically delegate any unimplemented members to the adopted member.
Powerfull binary search set of nodes for vl, to interpolate any kind of type.
This library provides helpers and extensions on top of Windows Composition and XAML storyboards. It is a part of the Windows Community Toolkit. Namespace: - CompositionAnimations: - Animations: AnimationBase, OffsetAnimation, OpacityAnimation, RotationAnimation, RotationInDegreesAnimation, ScalarAnimation, ScaleAnimation, TranslationAnimation, TypedAnimationBase, Vector2Animation, Vector3Animation, Vector4Animation - CompositionAnimations: ExpressionKeyFrame, KeyFrame, KeyFrameCollection, ScalarKeyFrame, TypedKeyFrame, Vector2KeyFrame, Vector3KeyFrame, Vector4KeyFrame - ConnectedAnimations: Connected, ConnectedAnimationHelper, ConnectedAnimationListProperty, ConnectedAnimationProperties - Expressions: ExpressionNodes, ExpressionValues, ReferenceNodes, CompositionExtensions, ExpressionFunctions, OperationType - AnimationExtensions: Blur, Fade, Light, Offset, Rotate, Saturation, Scale
Capability Composition for .NET — extensible, type-safe, and high-performance.
dbExpression is a database connector that enables fluent composition and execution of type safe SQL queries directly from Microsoft .NET. This tool provides for generation of code scaffolding for use with dbExpression.
ExpressWalker provides a generic way to examine and change any object graph in fashion similar to "Visitor Pattern". You can build generic hierarchy composition (visitor) that can visit and change any object's property, basing on configuration. Relies on expression trees while visiting objects (uses reflection only once while building a visitor). That's why IT IS WAY FASTER than custom solutions built with reflection. It is protected from circular references so you can avoid exceptions. Provides fluent API which increases code readability in terms of guessing the hierarchy being built from the code. Some of functionalities: visiting properties by matching owner type, property name and type (or only property type), visiting collecitons and dictionary items, specifying depth, custom expression for changing property value, cloning etc. //example 1 - IVisitor that visits properties by ownner type and property names and/or types (start from TypeWalker class): var typeVisitor = TypeWalker<Parent>.Create() .ForProperty<Parent, string>(p => p.TestString1, (old, met) => old + met) .ForProperty<Child, DateTime>(p => p.TestDate1, (old, met) => old.AddYears(10)) .ForProperty<CommonType>((old, met) => new CommonType { CommonString = "..." }) .Build(depth:10, guard:new PropertyGuard(), supportsCloning: true); //guard is protection against type-wise circular references. supportsCloning = false improves build time. var parentClone = new Parent(); var propertyValues = new HashSet<PropertyValue>() typeVisitor.Visit(parentObject, parentClone, depth:10, guard:new InstanceGuard(), values:propertyValues); //guard is protection against instance-wise circular references. values will hold flat list of new/old values. //example 2 - IVisitor that visits properties by explicit configuration (start from ManualWalker class): var manualVisitor = ManualWalker.Create<A1>() .Property<A1, DateTime>(a1 => a1.A1Date, (va1, met) => va1.AddYears(10)) .Element<A1, B1>(a1 => a1.B1, b1 => b1.Property<B1, string>(x => x.B1Name, (vb1, met) => vb1 + "Test2")) .Collection<A1, B2>(a1 => a1.B2List, b2 => b2 .Property<B2, DateTime>(x => x.B2Date, (vb2, met) => vb2.AddYears(10))) .Build(); manualVisitor.Visit(parentObject, blueprint:null, depth:10, guard:new InstanceGuard(), values:null); //Paremeter 'met' in expressions above is optional metadata object set in design-time. //It can be set by [VisitorMetadata] property attribute in visited class. //e.g. in example above, there is [VisitorMetadata("AnyString")] on property Parent.TestString1. //example 3 - IVisitor built and cached using the IVisitorsFactory: //scenario for visitors of same settings built for different types: var factory = new VisitorsFactory().WithSettings("name1", depth:5, usePropertyGuard:false, supportsCloning:false) .ForProperty<int>((val, met) => 2) .WithSettings("name6") .ForProperty<Parent, string>( x => x.Name, (val, met) => "t"); var visitor1 = factory.GetVisitor("name1", typeof(Class1)); var visitor1a = factory.GetVisitor("name1", typeof(Class1)); var visitor2 = factory.GetVisitor("name1", typeof(Class2)); var visitor6 = factory.GetVisitor("name6", typeof(Class6)); //visitor1 == visitor1a --true //visitor1 == visitor2 --false Many thanks to Francisco José Rey Gozalo for contributing with ideas and solutions. Read more on https://github.com/kopalite/ExpressWalker
dbExpression is a Microsoft SQL Server database connector that enables fluent composition and execution of type safe SQL queries directly from Microsoft .NET. dbExpression tooling and workflows provide efficiencies, uniformity and consistency between database schema and your application code.
Assembly Scan Extensions for SimpleInjector, Support CompositionRoot and Auto UnregisterdType Resolve
Type-safe routing with discriminated unions and railway-oriented handler composition for Falco
Maybe monad implementation with LINQ support for functional programming in C#. Provides type-safe null handling, eliminates null reference exceptions, and enables functional composition. Essential for functional programming patterns and safe value handling.
Entity Fields Analyser Tool: Explore Your Entity at a Glance Unlock a comprehensive view of your entity with our powerful tool, providing detailed insights into its structure and usage. The tool empowers you to: Field Overview: Categorize and explore fields in your entity based on their types. Gain insights into the percentage of usage for each field within your entity. Informative Charts: Visualize the distribution of Managed/Unmanaged Fields in your Entity through insightful charts. Obtain a breakdown of the Count of Fields Per Type, offering a clear understanding of your entity's composition. Explore the volume usage of your entity in terms of fields, providing essential metrics for efficient management. Data Charting Options: Customize the display of data charts by percentage, tailoring your visualization preferences. Easily view the Count of Entities, contributing to a holistic understanding of your data ecosystem. Field Calculator: Utilize the field calculator to assess the feasibility of creating a specific number of fields of different types within your entity. Gain valuable insights into the potential impact of field creation on your entity's structure. Empower Your Entity Management with our Entity Overview Tool!
dbExpression is a database connector that enables fluent composition and execution of type safe SQL queries directly from Microsoft .NET. This tool provides for generation of code scaffolding for use with dbExpression.
ExpressWalker provides a generic way to examine and change any object graph in fashion similar to "Visitor Pattern". You can build generic hierarchy composition (visitor) that can visit and change any object's property, basing on configuration. Relies on expression trees while visiting objects (uses reflection only once while building a visitor). That's why IT IS WAY FASTER than custom solutions built with reflection. It is protected from circular references so you can avoid exceptions. Provides fluent API which increases code readability in terms of guessing the hierarchy being built from the code. Some of functionalities: visiting properties by matching owner type, property name and type (or only property type), visiting collecitons and dictionary items, specifying depth, custom expression for changing property value, cloning etc. //example 1 - IVisitor that visits properties by ownner type and property names and/or types (start from TypeWalker class): var typeVisitor = TypeWalker<Parent>.Create() .ForProperty<Parent, string>(p => p.TestString1, (old, met) => old + met) .ForProperty<Child, DateTime>(p => p.TestDate1, (old, met) => old.AddYears(10)) .ForProperty<CommonType>((old, met) => new CommonType { CommonString = "..." }) .Build(depth:10, guard:new PropertyGuard(), supportsCloning: true); //guard is protection against type-wise circular references. supportsCloning = false improves build time. var parentClone = new Parent(); var propertyValues = new HashSet<PropertyValue>() typeVisitor.Visit(parentObject, parentClone, depth:10, guard:new InstanceGuard(), values:propertyValues); //guard is protection against instance-wise circular references. values will hold flat list of new/old values. //example 2 - IVisitor that visits properties by explicit configuration (start from ManualWalker class): var manualVisitor = ManualWalker.Create<A1>() .Property<A1, DateTime>(a1 => a1.A1Date, (va1, met) => va1.AddYears(10)) .Element<A1, B1>(a1 => a1.B1, b1 => b1.Property<B1, string>(x => x.B1Name, (vb1, met) => vb1 + "Test2")) .Collection<A1, B2>(a1 => a1.B2List, b2 => b2 .Property<B2, DateTime>(x => x.B2Date, (vb2, met) => vb2.AddYears(10))) .Build(); manualVisitor.Visit(parentObject, blueprint:null, depth:10, guard:new InstanceGuard(), values:null); //Paremeter 'met' in expressions above is optional metadata object set in design-time. //It can be set by [VisitorMetadata] property attribute in visited class. //e.g. in example above, there is [VisitorMetadata("AnyString")] on property Parent.TestString1. //example 3 - IVisitor built and cached using the IVisitorsFactory: //scenario for visitors of same settings built for different types: var factory = new VisitorsFactory().WithSettings("name1", depth:5, usePropertyGuard:false, supportsCloning:false) .ForProperty<int>((val, met) => 2) .WithSettings("name6") .ForProperty<Parent, string>( x => x.Name, (val, met) => "t"); var visitor1 = factory.GetVisitor("name1", typeof(Class1)); var visitor1a = factory.GetVisitor("name1", typeof(Class1)); var visitor2 = factory.GetVisitor("name1", typeof(Class2)); var visitor6 = factory.GetVisitor("name6", typeof(Class6)); //visitor1 == visitor1a --true //visitor1 == visitor2 --false Many thanks to Francisco José Rey Gozalo for contributing with ideas and solutions. Read more on https://github.com/kopalite/ExpressWalker.Core
This library provides various common UI helpers. It is a part of the Windows Community Toolkit. AdvancedCollectionView: It's a collection view implementation that support filtering, sorting and incremental loading. It's meant to be used in a viewmodel. CacheBase: Provides methods and tools to cache files in a folder. Converters: Commonly used converters that allow the data to be modified as it passes through the binding engine. Extensions: - ApplicationViewExtensions: Provides attached properties for interacting with the ApplicationView on a window (app view). - AttachedDropShadow: Provides a composition based shadow effect which supports masking. - FrameworkElementExtensions: Provides attached dependency properties for the FrameworkElement. - ListViewExtensions: Provides attached dependency properties for the ListViewBase - LogicalTree: Defines a collection of extensions methods for UI. - MatrixExtensions: Provides a set of extensions to the Matrix struct. - MatrixHelperEx: Static helper methods for Matrix. - Mouse: Helper class for easily changing the mouseover cursor type. - NullableBool: Custom MarkupExtension which can provide nullable bool values. - RotateTransformExtensions: Extension methods for RotateTransform. - ScaleTransformExtensions: Extension methods for ScaleTransform. - ScrollViewerExtensions: Provides attached dependency properties for the ListViewBase - SkewTransformExtensions: Extension methods for SkewTransform. - SurfaceDialTextbox: Helper class that provides attached properties to enable any TextBox with the Surface Dial. - TextBoxMask: TextBox mask property allows a user to more easily enter fixed width text in TextBox control. - TextBoxRegex: TextBoxRegex allows text validation using a regular expression. - TitleBarExtensions: Provides attached dependency properties for interacting with the ApplicationViewTitleBar on a window (app view). - TranslateTransformExtensions: Extension methods for TranslateTransform. - VisualExtensions: Extension methods and attached properties for Visual objects - VisualTree: Defines a collection of extensions methods for UI. Helpers: - BindableValueHolder: Holds the value. Can be used to change several objects' properties at a time. - DependencyPropertyWatcher: Used to Track Changes of a Dependency Property - ThemeListener: Class which listens for changes to Application Theme or High Contrast Modes and Signals an Event when they occur. Triggers: Various Visual State Triggers to help trigger VisualStates in a wide variety of scenarios.
A small, monadic Result-type library, targeting .Net 8.x and above. Outcomes are a fluent, compositonal discriminated union type representing a result value or a problem. Outcomes supports R.O.P. flow control (Railway Orientated Programming) via composition with async support, LINQ natural query form, or fliuent style with Then/ThenAsync.
dbExpression is a Microsoft SQL Server database connector that enables fluent composition and execution of type safe SQL queries directly from Microsoft .NET. dbExpression tooling and workflows provide efficiencies, uniformity and consistency between database schema and your application code.
Sharpnado.Maui.Shadows adds high-quality, customizable drop shadows to any .NET MAUI view on Android, iOS, Windows, and MacCatalyst. Define multiple shades per view with Color, Opacity, BlurRadius, and Offset, and match corners with CornerRadius for pixel-perfect results. Android supports a selectable blur algorithm via BlurType (Gpu or StackBlur). Built on modern MAUI handlers with platform-optimized implementations (RenderEffect/RenderScript on Android, CALayer on iOS/MacCatalyst, WinUI 3 Composition on Windows), weak events to prevent leaks, and global bitmap caching for performance. Includes XAML markup extensions (SingleShade, ImmutableShades, ShadeStack, NeumorphismShades) for concise, reusable definitions.
The well-tested analogy for part of very usefull Haskell's basic functions library created in C#. Implemented: Abs Map Foldr Foldr1 Foldl Foldl1 Head Tail All And Or Chr Ord Break Span Concat ConcatMap Const Not DigitToInt Drop Even DropWhile Elem Any Filter Flip Fst Snd GCD ID Init Iterate Last LCM Length Lines Max Min Maximum Minimum NotElem Null Odd Repeat Replicate Take Reverse Show Sort SplitAt TakeWhile ToUpper IsUpper ToLower IsLower Unlines Until Unwords Words Zip ZipWith Atan Compare Cos Div Error Exp Floor FromIntegral IsAlpha IsDigit IsSpace Log Mod Product Rem Quot Sin Sum Truncate Implemented like: Extensions - the most significant param is extended and, of course, the first one (usually the enumerator of something) Changes: Error does not return a type Compare returns same value as CompareTo (-1, 0, 1) instead Eq enum (LT, EQ, GT) FromIntegral just casting int to double Print and PutStr have additional parameter StringBuilder which return after write Implementation details: The mathematical functions like sin, cos, .. are easyilly implemented using System.Math and was not tested The class use nothing more then System library and Ienumerable interface The numerict functions are supported only for int and double (Sum, Product) Not implemented: pred succ undefined operators - it is not posible define or redefine properly (you have to use standard C# operators) Use only these functions can be useful for production code or like exercise for work with functions and composition of functions, but a lot of from prelude has been already implemented in System.Linq.