GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ppittle/pMixins: pMixins - Mixin framework for C#

This repository was archived by the owner on Apr 13, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

956 Commits
956 Commits

Folders and files

NameName
Last commit message
Last commit date
.nuget
.nuget
 
 
CopaceticSoftware.CodeGenerator.StarterKit.Tests
CopaceticSoftware.CodeGenerator.StarterKit.Tests
 
 
CopaceticSoftware.CodeGenerator.StarterKit
CopaceticSoftware.CodeGenerator.StarterKit
 
 
pMixins.CodeGenerator.Tests
pMixins.CodeGenerator.Tests
 
 
pMixins.CodeGenerator
pMixins.CodeGenerator
 
 
pMixins.ItemTemplate.Legacy.Package
pMixins.ItemTemplate.Legacy.Package
 
 
pMixins.ItemTemplate.Legacy
pMixins.ItemTemplate.Legacy
 
 
pMixins.ItemTemplate.Package
pMixins.ItemTemplate.Package
 
 
pMixins.ItemTemplate
pMixins.ItemTemplate
 
 
pMixins.Mvc.Recipes
pMixins.Mvc.Recipes
 
 
pMixins.Mvc
pMixins.Mvc
 
 
pMixins.Tests.Common
pMixins.Tests.Common
 
 
pMixins.TheorySandbox
pMixins.TheorySandbox
 
 
pMixins.VSPackage.Tests
pMixins.VSPackage.Tests
 
 
pMixins.VSPackage
pMixins.VSPackage
 
 
pMixins.VisualStudio
pMixins.VisualStudio
 
 
pMixins
pMixins
 
 
packages
packages
 
 
scripts
scripts
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
AppHarbor.sln
AppHarbor.sln
 
 
IntegrationTests.testsettings
IntegrationTests.testsettings
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
UnitTests.testsettings
UnitTests.testsettings
 
 
logo.ico
logo.ico
 
 
logo.png
logo.png
 
 
logoSmall.png
logoSmall.png
 
 
pMixins.sln
pMixins.sln
 
 

Repository files navigation

[pMixins]

###Welcome to [pMixins]! http://pmixins.com

[pMixins] is a Mixin framework for C#. Mixin code is generated at design time by a Visual Studio plug-in. You can download the plug-in here: https://visualstudiogallery.msdn.microsoft.com/a40fde9e-0e3f-4cdc-9c2a-af9de11695b2

Example usage:

Step 1: Define a Mixin Class that contains members that should be injected into other classes.

public class Mixin
{
  // This method should be in several classes
  public void Method(){ }
}

Step 2: Define a Target class that should get all of Mixin's Members (Note: This must be a partial class)

[pMixin(Target = typeof(Mixin)]
public partial class Target{}

Step 3: Save Target.cs. The [pMixin] Code Generator then gets to work generating the Composition code behind the scenes. Below is a simplified version to illustrate what's going on.

public partial class Target
{
  private Mixin _compositionInstance; 
  
  public void Method()
  {
    // forward call to Mixin instance
    _compositionInstance.Method();
  }
}

Step 4: You can now create an instance of Target and call the mixed in Mixin members!

public class Consumer  
{
  public void Example()
  {
    var target = new Target();
        
    // can call mixed in method
    target.Method();
        
    // can implicitly convert Target to Mixin
    Mixin m = new Target();
    m.Method();
  }
}
 

About

pMixins - Mixin framework for C#

pMixins.com

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

23 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.