Exemplo n.º 1
0
        public static bool IsAssignableFrom(this TypeHandle self, TypeHandle other, Stencil stencil)
        {
            var selfMetadata  = self.GetMetadata(stencil);
            var otherMetadata = other.GetMetadata(stencil);

            return(selfMetadata.IsAssignableFrom(otherMetadata));
        }
Exemplo n.º 2
0
        public static bool IsSubclassOf(this TypeHandle self, TypeHandle other, Stencil stencil)
        {
            var selfMetadata  = self.GetMetadata(stencil);
            var otherMetadata = other.GetMetadata(stencil);

            return(selfMetadata.IsSubclassOf(otherMetadata));
        }
Exemplo n.º 3
0
 public IEnumerable <TypeHandle> GetGenericArguments(Stencil stencil)
 {
     foreach (var t in this.Resolve(stencil).GenericTypeArguments)
     {
         yield return(t.GenerateTypeHandle(stencil));
     }
 }
Exemplo n.º 4
0
 public string FriendlyName(Stencil stencil)
 {
     if (!string.IsNullOrEmpty(Identification))
     {
         return(this.Resolve(stencil).FriendlyName());
     }
     return("");
 }
 public ClassSearcherFilterProvider(Stencil stencil)
 {
     m_Stencil = stencil;
 }
Exemplo n.º 6
0
 public void SetParent(Type type, VSGraphModel graphModel)
 {
     Assert.IsTrue(typeof(Stencil).IsAssignableFrom(type));
     m_Parent = (Stencil)Activator.CreateInstance(type);
     graphModel.AssetModel.SetAssetDirty();
 }
 public MacroSearcherFilterProvider(Stencil stencil)
 {
     m_Stencil = stencil;
 }
Exemplo n.º 8
0
 public string Name(Stencil stencil)
 {
     return(this.Resolve(stencil).Name);
 }
Exemplo n.º 9
0
 public static TypeSyntax ToTypeSyntax(this TypeHandle handle, Stencil stencil)
 {
     return(handle.Resolve(stencil).ToTypeSyntax());
 }
Exemplo n.º 10
0
 public static ITypeMetadata GetMetadata(this TypeHandle th, Stencil stencil)
 {
     return(th.GetMetadata(stencil.GraphContext.TypeMetadataResolver));
 }
Exemplo n.º 11
0
 public static ITypeMetadata GetMetadata(this Type t, Stencil stencil)
 {
     return(t.GenerateTypeHandle(stencil).GetMetadata(stencil));
 }
Exemplo n.º 12
0
 public static Type Resolve(this TypeHandle th, Stencil stencil)
 {
     return(th.Resolve(stencil.GraphContext.CSharpTypeSerializer));
 }
Exemplo n.º 13
0
 public static TypeHandle GenerateTypeHandle(this Type t, Stencil stencil)
 {
     Assert.IsNotNull(t);
     return(t.GenerateTypeHandle());
 }
Exemplo n.º 14
0
 public ClassSearcherDatabaseProvider(Stencil stencil)
 {
     m_Stencil = stencil;
 }