Ejemplo n.º 1
0
        /// <summary>
        /// Determines whether given parameter is treated as a special implicitly provided, by the compiler or the runtime.
        /// </summary>
        public static bool IsImportValueParameter(IParameterSymbol p, out ValueSpec valueEnum)
        {
            if (p != null)
            {
                var attr = ((ParameterSymbol)p).GetAttribute("Pchp.Core.ImportValueAttribute");
                if (attr != null)
                {
                    var args = attr.ConstructorArguments;
                    if (args.Length == 1 && args[0].Value is int enumvalue)
                    {
                        valueEnum = (ValueSpec)enumvalue;
                        return(true);
                    }
                }
            }

            //
            valueEnum = default;
            return(false);
        }
Ejemplo n.º 2
0
 public ImportValueAttribute(ValueSpec value)
 {
     this.Value = value;
 }
Ejemplo n.º 3
0
 protected bool Equals(ValueSpec other)
 {
     return(Equals(ColumnRef, other.ColumnRef) && Transform == other.Transform);
 }