Ejemplo n.º 1
0
        private void SetStandardValue <T>(T value, Type attrType)
        {
            IAttributeDeclaration iad = ExtractAttribute(attrType);

            iad.Parameters.Clear();
            iad.Parameters.AddNew(new PrimitiveExpression(value));
        }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 public abstract void TranslateAttribute(IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute);
Ejemplo n.º 4
0
 public override void TranslateAttribute(AttributeTargets target, IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 public override void TranslateAttribute(IAttributeDeclarationTarget attributeSource, IAttributeDeclaration attribute)
 {
     throw new NotSupportedException("The method or operation is not supported.");
 }