private void SetStandardValue <T>(T value, Type attrType) { IAttributeDeclaration iad = ExtractAttribute(attrType); iad.Parameters.Clear(); iad.Parameters.AddNew(new PrimitiveExpression(value)); }
private T StandardExtractAttribute <T>(IAttributeDeclaration attr) { if (attr.Parameters.Count > 0 && attr.Parameters[0].Value is IPrimitiveExpression) { return((T)((IPrimitiveExpression)(attr.Parameters[0].Value)).Value); } return(default(T)); }
public abstract void TranslateAttribute(IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute);
public override void TranslateAttribute(AttributeTargets target, IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute) { throw new NotImplementedException(); }
public override void TranslateAttribute(IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute) { throw new NotSupportedException("The method or operation is not supported."); }