Found 45 packages
Provides a dynamic API over XLinq: var xdoc = XDocument.Load("rss.xml"); var rss = doc.Root.ToDynamic(); // Type conversion, element traversal // using dotted path notation DateTime pubDate = rss.channel.pubDate; // Type conversion, attribute navigation // using indexer notation int port = rss.channel.cloud["port"]
XML XSerializer's XML serialization handles properties and types that the System.Xml.Serialization.XmlSerializer does not handle, such as interfaces and dictionaries. It is meant to be a drop-in replacement for the BCL XmlSerializer - it uses the same attributes: [XmlElement], [XmlAttribute], etc. JSON JSON serialization in XSerializer has better performance than JSON.NET (Newtonsoft). It also has better support for deserialization into a variable or field of type dynamic. Encryption XSerializer's XML and JSON serializers support the concept of field-level encryption. Properties that are decorated with an [Encrypt] attribute have their values encrypted/decrypted automatically. The actual mechanism to encrypt these fields is exposed through the IEncryptionMechanism interface - users of the encrypt feature are expected to implement this interface in their project.
This project allows you easily add dynamic properties to any existing instance without creating derived type in .NET (C# or VB.NET). This approach is similar as attached dependency properties in WPF. It can be used as attribute system for complex definition of data model behavior or just to create temporary properties on existing object model.
Dynamic Type Generator For .NET
MercadoLibre product variation builder and split strategy library. Automatically converts 1688 product data to MercadoLibre format with dynamic attribute matching, variation building, and price calculation.
Authorization attribute that integrates with Kentico user permissions, including module permissions and page ACL permissions, leveraging the DynamicRouting.Kentico.MVC library for retreiving the page.
A dependency injection library for registering services through attributes.
Implementation of the IPolicyExpression interface that uses dynamic expression building blocks to construct expressions that evaluate the policy rules.
Package "Hafner.Compatibility.DynamicallyAccessedMembersAttribute" defines the attributes "DynamicallyAccessedMembersAttribute", "DynamicDependencyAttribute" and "RequiresUnreferencedCodeAttribute" of namespace "System.Diagnostics.CodeAnalysis" as well as enum "DynamicallyAccessedMemberTypes".
Create and modify permissions dynamically along side EF Core. How to use: Create an Enum that defines the Access Levels (No access should be 0) Create a custom DbContext object that inherits from PermissionsDbContext with your enum as the generic parameter. Example: CustomDbContext : PermissionsDbContext<MyCustomEnum> Add services.AddRoleBasedPermissions<CustomDbContext, MyCustomEnum>(yourConnectionString); to the startup.cs file. Now can utilize the ValidatePermissions attribute on your endpoints: [ValidatePermissions("GET_Weather", Name = "Get Weather Forecasts - View", Group = "Weather")] public IActionResult GetWeather() {...}
AssemblyExtensions, EnumerableExtensions, IFactory, Reflection, TypeExtensions, DynamicXmlElement, ConsoleManager, validation helpers, converters, attributes
Build Model Context Protocol (MCP) servers in .NET with MCPSharp. Create MCP-compliant tools and functions that AI models can discover and use. Features attribute-based API, and seamless JSON-RPC communication. await MCPServer.StartAsync("EchoServer", "1.0.0"); [McpTool] class MyTool { [McpFunction("echo","returns the input string back to you")] public string echo(string input) => input; }
Flatwhite is an AOP library with MVC and WebAPI ActionFilter style using Castle dynamic proxy. You can create MethodFilterAttribute to add custom logic to any methods as soon as it is interceptable by Castle Dynamic Proxy. Flatwhite has 1 built-in OutputCacheFilter to cache method result which can auto refresh stale content. You can use Flatwhite simply for caching or extending behavior of your methods such as profiling, logging by implement MethodFilterAttribute similar to MVC's ActionFilterAttribute
This package can be used to intercept attribute param values during serialization/deserialization process. NOTES: It's thread safe. IMPORTANT: Use this tool when no other option left. Avoid using it, as it drastically hits the performance due to heavy use of reflection behind the scene. Never use it in combo with NewtonsoftJson, as the memory allocated for dynamically generated types will never get cleaned up, because of NewtonsoftJson holding the references to those types in his internal cache for faster contract-resolve operations. You can use any serializer which does not implement any caching or the caching can be disabled. For more information, go to GitHub wiki page: https://github.com/Dorin-Mocan/SerializationInterceptor/wiki. LIMITATIONS: - Fields not supported. Only public non-static props are serialized/deserialized; - Root type and types of the props must be public(not declared in any non-public types either) and have a default parameterless constructor; - Only param values of attributes attached to types and properties can be intercepted; - Not all enumerables supported. Allowed only arrays of any number of dimensions supported by CLR and types from System.Collections.Generic that implement generic ICollection interface; - Inheritance supported partially. If you have a prop of type X and assign to that prop a value of type Y and Y is a subclass of X, then only props of type X will be serialized/deserialized, those of type Y which are not in X will be ignored;
This library contains attribute which is used by NuGetUtils.Tool.Exec tool when it executes a method within a NuGet package. This attribute can be used to modify the behaviour of NuGetUtils.Tool.Exec and how it detects the method to be executed.
This is a custom server-side validation library for C# and .NET. This version includes the following validation attributes: 1. RequiredIfAttribute: To mark a field required based on the value of another field. 2. MaxAgeAttribute: To validate maximum age against the date of birth value of DateTime type. 3. MinAgeAttribute: To validate the minimum required age against a date of birth value of DateTime type. 4. MaxDateAttribute: To set max value validation for a DateTime field. 5. MinDateAttribute: To set min value validation for a DateTime field. 6. TextEditorRequiredAttribute: To enforce the required validation attribute on the online text editors like TinyMCE, CKEditor, etc. 7. CompareToAttribute: To compare one property value against another property value of the same object. Comparison types are: Equal, NotEqual,GreaterThan,GreatherThanOrEqual,SmallerThan,SmallerThanOrEqual This version also includes validation against dynamic values from database, configuration file or any external source added for the following type: 1. DateTime Type: with ValidateMaxAge() and ValidateMinAge()
This is a custom server-side validation library for ASP.NET Core. This also includes jQuery client-side validation for each server-side validation. This version includes the following validation attributes: 1. FileAttribute: To validate file type, file max size, file min size, etc. 2. FileTypeAttribute: To validate type of a file. 3. FileMaxSizeAttribute: To validate allowed max size of a file. 4. FileMinSizeAttribute: To validate allowed min size of a file. 5. MaxAgeAttribute: To validate maximum age against the date of birth value of DateTime type. 6. MinAgeAttribute: To validate the minimum required age against a date of birth value of DateTime type. 7. MaxDateAttribute: To set max value validation for a DateTime field. 8. MinDateAttribute: To set min value validation for a DateTime field. 9. TextEditorRequiredAttribute: To enforce the required validation attribute on the online text editors like TinyMCE, CKEditor, etc. 10. CompareToAttribute: To compare one property value against another property value of the same object. Comparison types are: Equal,NotEqual,GreaterThan,GreatherThanOrEqual,SmallerThan,SmallerThanOrEqual 11. RequiredIfAttribute: To mark a field required based on the value of another field. This version also includes validation against dynamic values from database, configuration file or any external source added for the following type: 1. File Type: with ValidateFile() method 1. DateTime Type: with ValidateMaxAge() and ValidateMinAge()
Automatic method profiling with AOP (Castle.DynamicProxy) support for Chronolap. Profile methods using simple attributes.
Caching Attributes; method caching with interceptors on .netcore using Castle Windsor DI DynamicProxying, via Cache Attribute
Flatwhite is an AOP library with MVC and WebAPI ActionFilter style using Castle dynamic proxy. You can create MethodFilterAttribute to add custom logic to any methods as soon as it is interceptable by Castle Dynamic Proxy. Flatwhite has 1 built-in OutputCacheFilter to cache method result which can auto refresh stale content. You can use Flatwhite simply for caching or extending behavior of your methods such as profiling, logging by implement MethodFilterAttribute similar to MVC's ActionFilterAttribute. Flatwhite.Autofac is a Autofac support package for Flatwhite core