Ejemplo n.º 1
0
        public static int GetBranchOffset(this ParameterType value)
        {
            var branchOffset = value.GetAttribute <BranchOffsetAttribute>();

            if (branchOffset == null)
            {
                return(0);
            }
            return(branchOffset.Offset);
        }
Ejemplo n.º 2
0
        public static int GetIndex(this ParameterType value)
        {
            var parameterIndex = value.GetAttribute <ParameterIndexAttribute>();

            if (parameterIndex == null)
            {
                throw new ApplicationException(string.Format("{0} did not specify a parameter index", value.ToString()));
            }
            return(parameterIndex.Index);
        }
Ejemplo n.º 3
0
        public static int[] GetBranchIndexes(this ParameterType value)
        {
            var parameterIndex = value.GetAttribute <BranchIndexesAttribute>();

            if (parameterIndex == null)
            {
                throw new ApplicationException(string.Format("{0} did not specify any branch index", value.ToString()));
            }
            return(parameterIndex.Indexes);
        }