public static int GetBranchOffset(this ParameterType value) { var branchOffset = value.GetAttribute <BranchOffsetAttribute>(); if (branchOffset == null) { return(0); } return(branchOffset.Offset); }
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); }
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); }