本文整理汇总了C#中IProperty.GetParameters方法的典型用法代码示例。如果您正苦于以下问题:C# IProperty.GetParameters方法的具体用法?C# IProperty.GetParameters怎么用?C# IProperty.GetParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProperty
的用法示例。
在下文中一共展示了IProperty.GetParameters方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatePropertyStub
Property CreatePropertyStub(ClassDefinition node, IProperty baseProperty)
{
//try to complete partial implementation if any
Property property = node.Members[baseProperty.Name] as Property;
if (null == property) {
property = new Property(LexicalInfo.Empty);
property.Name = baseProperty.Name;
property.Modifiers = TypeSystemServices.GetAccess(baseProperty) | TypeMemberModifiers.Virtual;
property.IsSynthetic = true;
DeclareParameters(property, baseProperty.GetParameters(), baseProperty.IsStatic ? 0 : 1);
property.Type = CreateTypeReference(baseProperty.Type);
}
if (property.Getter == null && null != baseProperty.GetGetMethod())
property.Getter = CreateMethodStub(baseProperty.GetGetMethod());
if (property.Setter == null && null != baseProperty.GetSetMethod())
property.Setter = CreateMethodStub(baseProperty.GetSetMethod());
EnsureEntityFor(property);
return property;
}
示例2: CheckOverrideSignature
static bool CheckOverrideSignature(IProperty p, IProperty candidate)
{
return TypeSystemServices.CheckOverrideSignature(p.GetParameters(), candidate.GetParameters());
}
示例3: CreateAbstractProperty
Property CreateAbstractProperty(TypeReference reference, IProperty property)
{
Debug.Assert(0 == property.GetParameters().Length);
Property p = CodeBuilder.CreateProperty(property.Name, property.Type);
p.Modifiers |= TypeMemberModifiers.Abstract;
IMethod getter = property.GetGetMethod();
if (getter != null)
{
p.Getter = CodeBuilder.CreateAbstractMethod(reference.LexicalInfo, getter);
}
IMethod setter = property.GetSetMethod();
if (setter != null)
{
p.Setter = CodeBuilder.CreateAbstractMethod(reference.LexicalInfo, setter);
}
return p;
}
示例4: ResolveClassAbstractProperty
void ResolveClassAbstractProperty(ClassDefinition node,
TypeReference baseTypeRef,
IProperty entity)
{
bool resolved = false;
foreach (TypeMember member in node.Members)
{
if (entity.Name != member.Name
|| NodeType.Property != member.NodeType
|| !IsCorrectExplicitMemberImplOrNoExplicitMemberAtAll(member, entity)
|| !TypeSystemServices.CheckOverrideSignature(entity.GetParameters(), GetPropertyEntity(member).GetParameters()))
continue;
Property p = (Property) member;
ProcessPropertyAccessor(p, p.Getter, entity.GetGetMethod());
ProcessPropertyAccessor(p, p.Setter, entity.GetSetMethod());
if (null == p.Type)
{
p.Type = CodeBuilder.CreateTypeReference(entity.Type);
}
else
{
if (entity.Type != p.Type.Entity)
Error(CompilerErrorFactory.ConflictWithInheritedMember(p, p.FullName, entity.FullName));
}
resolved = true;
}
if (resolved)
return;
foreach(SimpleTypeReference parent in node.BaseTypes)
{
if(_classDefinitionList.Contains(parent.Name))
{
depth++;
ResolveClassAbstractProperty(_classDefinitionList[parent.Name] as ClassDefinition, baseTypeRef, entity);
depth--;
}
}
if(CheckInheritsInterfaceImplementation(node, entity))
return;
if(depth == 0)
{
node.Members.Add(CreateAbstractProperty(baseTypeRef, entity));
AbstractMemberNotImplemented(node, baseTypeRef, entity);
}
}
示例5: CheckInheritedPropertyImpl
bool CheckInheritedPropertyImpl(IProperty impl, IProperty target)
{
if(impl.Type == target.Type)
{
if(TypeSystemServices.CheckOverrideSignature(impl.GetParameters(), target.GetParameters()))
{
if(HasGetter(target))
{
if(!HasGetter(impl))
{
return false;
}
}
if(HasSetter(target))
{
if(!HasSetter(impl))
{
return false;
}
}
/* Unnecessary?
if(impl.IsPublic != target.IsPublic ||
impl.IsProtected != target.IsProtected ||
impl.IsPrivate != target.IsPrivate)
{
return false;
}*/
return true;
}
}
return false;
}