mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
865 B
35 lines
865 B
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team |
|
// This code is distributed under the MS-PL (for details please see \doc\MS-PL.txt) |
|
|
|
using System; |
|
using System.Linq; |
|
using Mono.Cecil; |
|
using Ricciolo.StylesExplorer.MarkupReflection; |
|
|
|
namespace ILSpy.BamlDecompiler |
|
{ |
|
public class CecilDependencyPropertyDescriptor : IDependencyPropertyDescriptor |
|
{ |
|
string member; |
|
TypeDefinition type; |
|
|
|
public CecilDependencyPropertyDescriptor(string member, TypeDefinition type) |
|
{ |
|
if (type == null) |
|
throw new ArgumentNullException("type"); |
|
this.member = member; |
|
this.type = type; |
|
} |
|
|
|
public bool IsAttached { |
|
get { |
|
return type.Methods.Any(m => m.Name == "Get" + member); |
|
} |
|
} |
|
|
|
public override string ToString() |
|
{ |
|
return string.Format("[CecilDependencyPropertyDescriptor Member={0}, Type={1}]", member, type); |
|
} |
|
} |
|
}
|
|
|