Skip to content

Instantly share code, notes, and snippets.

@becky7
Forked from mgroves/gist:1110922
Created November 26, 2015 16:29
Show Gist options
  • Save becky7/14db962727d011b5caae to your computer and use it in GitHub Desktop.
Save becky7/14db962727d011b5caae 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