Search Results for

    Show / Hide Table of Contents

    Class ContractExtensions

    Extension methods on the classes defined in the Contracts assembly

    Inheritance
    Object
    ContractExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: NipoSoftware.Nfield.Interviewing.Extensions
    Assembly: NipoSoftware.Nfield.TemplateHelpers.dll
    Syntax
    public static class ContractExtensions

    Methods

    AddAlphaDataAttributes(Contracts.Data.Open, HtmlHelper)

    Adds data- attributes for the constraints on a Alpha

    Declaration
    public static IHtmlString AddAlphaDataAttributes(this Contracts.Data.Open open, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Open open
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AddDataAttributes(Contracts.Data.CategoryList, HtmlHelper)

    Adds data- attributes for the constraints for category question.

    Declaration
    public static IHtmlString AddDataAttributes(this Contracts.Data.CategoryList list, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.CategoryList list
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AddDataAttributes(Contracts.Data.Open, HtmlHelper)

    Adds data- attributes for the constraints on an Open

    Declaration
    public static IHtmlString AddDataAttributes(this Contracts.Data.Open open, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Open open
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AddDataAttributes(Contracts.Data.Screen, HtmlHelper)

    Adds data attributes for matrix container Matrix template is NOT calling this method at the moment TODO: Make sure Matrix view calls this extension method when the CAPI Client minimum version is set to 1.47

    Declaration
    public static IHtmlString AddDataAttributes(this Contracts.Data.Screen screen, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Screen screen
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AddDataAttributes(Contracts.Data.Segment, HtmlHelper)

    Declaration
    public static IHtmlString AddDataAttributes(this Contracts.Data.Segment segment, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Segment segment
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AdditionalClassString(Contracts.Data.Segment)

    Declaration
    public static string AdditionalClassString(this Contracts.Data.Segment segment)
    Parameters
    Type Name Description
    Contracts.Data.Segment segment
    Returns
    Type Description
    String

    AddLineDataAttributes(Contracts.Data.Open, HtmlHelper)

    Adds data- attributes for the constraints on a Line

    Declaration
    public static IHtmlString AddLineDataAttributes(this Contracts.Data.Open open, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Open open
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AddNumberDataAttributes(Contracts.Data.Open, HtmlHelper)

    Adds data- attributes for the constraints on a Number

    Declaration
    public static IHtmlString AddNumberDataAttributes(this Contracts.Data.Open open, HtmlHelper html)
    Parameters
    Type Name Description
    Contracts.Data.Open open
    HtmlHelper html
    Returns
    Type Description
    IHtmlString

    AsHtmlId(String, HtmlHelper, String, String)

    Returns a string as an html id attribute

    Declaration
    public static IHtmlString AsHtmlId(this string value, HtmlHelper html, string prefix = null, string suffix = null)
    Parameters
    Type Name Description
    String value
    HtmlHelper html
    String prefix
    String suffix
    Returns
    Type Description
    IHtmlString

    CreateParentingStructure(Contracts.Data.InterviewResult)

    Create the parenting structure for the specified interviewResult.

    Declaration
    public static Contracts.Data.InterviewResult CreateParentingStructure(this Contracts.Data.InterviewResult interviewResult)
    Parameters
    Type Name Description
    Contracts.Data.InterviewResult interviewResult
    Returns
    Type Description
    Contracts.Data.InterviewResult

    ErrorVisibility(Contracts.Data.Segment)

    Determines visibility of the error message.

    Declaration
    public static string ErrorVisibility(this Contracts.Data.Segment segment)
    Parameters
    Type Name Description
    Contracts.Data.Segment segment

    The segemnt.

    Returns
    Type Description
    String

    Returns the string that determines the visibility of the error message.

    GetAppIdForSegment(Contracts.Data.Segment)

    Returns the configured Facebook application id for the segment.

    Declaration
    public static string GetAppIdForSegment(this Contracts.Data.Segment segment)
    Parameters
    Type Name Description
    Contracts.Data.Segment segment
    Returns
    Type Description
    String

    GetConstraintValue(IEnumerable<Contracts.Data.Constraint>, String)

    Get the value of a constraint

    Declaration
    public static string GetConstraintValue(this IEnumerable<Contracts.Data.Constraint> constraints, string name)
    Parameters
    Type Name Description
    IEnumerable<Contracts.Data.Constraint> constraints
    String name
    Returns
    Type Description
    String

    GetStyles(Style)

    Declaration
    public static IEnumerable<string> GetStyles(this Style style)
    Parameters
    Type Name Description
    Style style
    Returns
    Type Description
    IEnumerable<String>

    IsExclusive(IEnumerable<Contracts.Data.Constraint>)

    Determine if the constraints of a category make the category exclusive.

    Declaration
    public static bool IsExclusive(this IEnumerable<Contracts.Data.Constraint> constraints)
    Parameters
    Type Name Description
    IEnumerable<Contracts.Data.Constraint> constraints
    Returns
    Type Description
    Boolean

    NameForInput(Contracts.Data.Category)

    Determine the value of the name attribute for a category

    Declaration
    public static string NameForInput(this Contracts.Data.Category category)
    Parameters
    Type Name Description
    Contracts.Data.Category category
    Returns
    Type Description
    String

    NameForInput(Contracts.Data.Open)

    Determine the value of the name attribute for a category

    Declaration
    public static string NameForInput(this Contracts.Data.Open open)
    Parameters
    Type Name Description
    Contracts.Data.Open open
    Returns
    Type Description
    String

    RenderCheckedAttribute(Contracts.Data.Category)

    Render 'radio' for exclusive categories and 'checkbox' for non-exclusive categories

    Declaration
    public static string RenderCheckedAttribute(this Contracts.Data.Category category)
    Parameters
    Type Name Description
    Contracts.Data.Category category
    Returns
    Type Description
    String

    RenderInputType(Contracts.Data.Category)

    Render 'radio' for exclusive categories and 'checkbox' for non-exclusive categories

    Declaration
    public static string RenderInputType(this Contracts.Data.Category category)
    Parameters
    Type Name Description
    Contracts.Data.Category category
    Returns
    Type Description
    String

    RewriteMediaReferences(IEnumerable<KeyValuePair<String, String>>)

    Declaration
    public static IEnumerable<KeyValuePair<string, string>> RewriteMediaReferences(this IEnumerable<KeyValuePair<string, string>> originalOptions)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<String, String>> originalOptions
    Returns
    Type Description
    IEnumerable<KeyValuePair<String, String>>

    SetCategoryLabel(Contracts.Data.Category, String)

    Set the text label for a category

    Declaration
    public static void SetCategoryLabel(this Contracts.Data.Category category, string label)
    Parameters
    Type Name Description
    Contracts.Data.Category category
    String label

    ToCssString(Style)

    Declaration
    public static string ToCssString(this Style style)
    Parameters
    Type Name Description
    Style style
    Returns
    Type Description
    String

    ToCssString(IEnumerable<Style>)

    Declaration
    public static string ToCssString(this IEnumerable<Style> styles)
    Parameters
    Type Name Description
    IEnumerable<Style> styles
    Returns
    Type Description
    String

    ToJavaScript(IEnumerable<Contracts.Data.ErrorMessage>)

    Convert the error messages to a JSON object

    Declaration
    public static string ToJavaScript(this IEnumerable<Contracts.Data.ErrorMessage> errorMessages)
    Parameters
    Type Name Description
    IEnumerable<Contracts.Data.ErrorMessage> errorMessages
    Returns
    Type Description
    String
    In This Article
    Back to top Generated by DocFX