Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created July 28, 2011 03:36
Show Gist options
  • Save mgroves/1110922 to your computer and use it in GitHub Desktop.
Save mgroves/1110922 to your computer and use it in GitHub Desktop.
friend
// ApiA.cs
using PostSharp.Constraints;
namespace PostsharpArchitecturalConstraints.API.NamespaceA
{
[Friend]
internal class ApiA
{
public string GetFriendsName()
{
return "Mr. Friendly";
}
}
}
// ApiB.cs
using PostsharpArchitecturalConstraints.API.NamespaceA;
namespace PostsharpArchitecturalConstraints.API.NamespaceB
{
public class ApiB
{
public string GetFriendsName()
{
var a = new ApiA();
return a.GetFriendsName();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment