Beispiel #1
0
 /// <summary>
 /// Creates a <see cref="IFormObject"/> with specified FormId and adds to an <see cref="IOptionObject"/> using provided FormId and indicating whether it is a multiple iteration table.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <param name="multipleIteration"></param>
 /// <returns></returns>
 public static IOptionObject AddFormObject(IOptionObject optionObject, string formId, bool multipleIteration)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(AddFormObject(optionObject.ToOptionObject2015(), formId, multipleIteration).ToOptionObject());
 }
Beispiel #2
0
 /// <summary>
 /// Used to create the <see cref="IOptionObject"/> for return to myAvatar using provide Error Code and Error Message.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="errorCode"></param>
 /// <param name="errorMessage"></param>
 /// <returns></returns>
 public static IOptionObject GetReturnOptionObject(IOptionObject optionObject, double errorCode, string errorMessage)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(GetReturnOptionObject(optionObject.ToOptionObject2015(), errorCode, errorMessage).ToOptionObject());
 }
Beispiel #3
0
 /// <summary>
 /// Used to create the <see cref="IOptionObject"/> for return to myAvatar.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="errorCode"></param>
 /// <param name="errorMessage"></param>
 /// <returns></returns>
 public static IOptionObject GetReturnOptionObject(IOptionObject optionObject)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(GetReturnOptionObject(optionObject.ToOptionObject2015(), 0, "").ToOptionObject());
 }
 /// <summary>
 /// Returns whether the <see cref="IFieldObject"/> in the <see cref="IOptionObject"/> is present by FieldNumber.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="fieldNumber"></param>
 /// <returns></returns>
 public static bool IsFieldPresent(IOptionObject optionObject, string fieldNumber)
 {
     if (optionObject == null)
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     if (fieldNumber == null || fieldNumber == "")
         throw new ArgumentNullException("Parameter cannot be null or blank.", "fieldNumber");
     return IsFieldPresent(optionObject.ToOptionObject2015(), fieldNumber);
 }
 /// <summary>
 /// Returns the FieldValue of a specified <see cref="IFieldObject"/> in an <see cref="IOptionObject"/> by FormId, RowId, and FieldNumber.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <param name="rowId"></param>
 /// <param name="fieldNumber"></param>
 /// <returns></returns>
 public static string GetFieldValue(IOptionObject optionObject, string formId, string rowId, string fieldNumber)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(GetFieldValue(optionObject.ToOptionObject2015(), formId, rowId, fieldNumber));
 }
Beispiel #6
0
 /// <summary>
 /// Sets <see cref="FieldObject"/> in an <see cref="IOptionObject"/> according to specified FieldAction.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="fieldAction"></param>
 /// <param name="fieldNumbers"></param>
 /// <returns></returns>
 public static IOptionObject SetFieldObjects(IOptionObject optionObject, string fieldAction, List <string> fieldNumbers)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null.", "optionObject");
     }
     return(SetFieldObjects(optionObject.ToOptionObject2015(), fieldAction, fieldNumbers).ToOptionObject());
 }
 /// <summary>
 /// Returns the ParentRowId of a <see cref="IFormObject"/> in the <see cref="IOptionObject"/> by FormId.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <returns></returns>
 public static string GetParentRowId(IOptionObject optionObject, string formId)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(GetParentRowId(optionObject.ToOptionObject2015(), formId));
 }
Beispiel #8
0
 /// <summary>
 /// Sets all <see cref="IFieldObject"/> in the <see cref="IOptionObject"/> to disabled, except for the FieldNumbers specified in List.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="excludedFields"></param>
 /// <returns></returns>
 public static IOptionObject DisableAllFieldObjects(IOptionObject optionObject, List <string> excludedFields)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(DisableAllFieldObjects(optionObject.ToOptionObject2015(), excludedFields).ToOptionObject());
 }
 /// <summary>
 /// Returns whether a <see cref="IFormObject"/> in the <see cref="IOptionObject"/> is Multiple Iteration by specified FormId.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <returns></returns>
 public static bool GetMultipleIterationStatus(IOptionObject optionObject, string formId)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     return(GetMultipleIterationStatus(optionObject.ToOptionObject2015(), formId));
 }
 /// <summary>
 /// Returns whether the <see cref="IFieldObject"/> in the <see cref="IOptionObject"/> is required by FieldNumber.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="fieldNumber"></param>
 /// <returns></returns>
 public static bool IsFieldRequired(IOptionObject optionObject, string fieldNumber)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     if (fieldNumber == null || fieldNumber == "")
     {
         throw new ArgumentNullException("Parameter cannot be null or blank.", "fieldNumber");
     }
     return(IsFieldRequired(optionObject.ToOptionObject2015(), fieldNumber));
 }
 /// <summary>
 /// Sets the FieldValue of a <see cref="FieldObject"/> in a <see cref="IOptionObject"/> by FieldNumber.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="fieldNumber"></param>
 /// <param name="fieldValue"></param>
 /// <returns></returns>
 public static IOptionObject SetFieldValue(IOptionObject optionObject, string fieldNumber, string fieldValue)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null.", "optionObject");
     }
     if (fieldNumber == null || fieldNumber == "")
     {
         throw new ArgumentNullException("Parameter cannot be null or blank.", "fieldNumber");
     }
     return(SetFieldValue(optionObject.ToOptionObject2015(), fieldNumber, fieldValue).ToOptionObject());;
 }
 /// <summary>
 /// Returns whether the <see cref="IRowObject"/> in an <see cref="IOptionObject"/> is marked for deletion by RowId.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="rowId"></param>
 /// <returns></returns>
 public static bool IsRowMarkedForDeletion(IOptionObject optionObject, string rowId)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     if (rowId == null || rowId == "")
     {
         throw new ArgumentNullException("Parameter cannot be null or blank.", "rowId");
     }
     return(IsRowMarkedForDeletion(optionObject.ToOptionObject2015(), rowId));
 }
Beispiel #13
0
 /// <summary>
 /// Adds a <see cref="IFormObject"/> to an <see cref="IOptionObject2015"/>.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formObject"></param>
 /// <returns></returns>
 public static IOptionObject AddFormObject(IOptionObject optionObject, IFormObject formObject)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     if (formObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "formObject");
     }
     return(AddFormObject(optionObject.ToOptionObject2015(), formObject).ToOptionObject());
 }
 /// <summary>
 /// Flags a <see cref="RowObject"/> for deletion in specified <see cref="IOptionObject"/> by RowId.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="rowId"></param>
 /// <returns></returns>
 public static IOptionObject DeleteRowObject(IOptionObject optionObject, string rowId)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null.", "optionObject");
     }
     if (rowId == null || rowId == "")
     {
         throw new ArgumentNullException("Parameter cannot be null or blank.", "rowId");
     }
     return(DeleteRowObject(optionObject.ToOptionObject2015(), rowId).ToOptionObject());
 }
 /// <summary>
 /// Flags a <see cref="IRowObject"/> for deletion in specified <see cref="IOptionObject"/>.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="rowObject"></param>
 /// <returns></returns>
 public static IOptionObject DeleteRowObject(IOptionObject optionObject, IRowObject rowObject)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null.", "optionObject");
     }
     if (rowObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null.", "rowObject");
     }
     return(DeleteRowObject(optionObject.ToOptionObject2015(), rowObject).ToOptionObject());
 }
Beispiel #16
0
 /// <summary>
 /// Returns whether a <see cref="FormObject"/> exists in an <see cref="OptionObject"/> by <see cref="FormObject.FormId"/>.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <returns></returns>
 public static bool IsFormPresent(IOptionObject optionObject, string formId)
 {
     if (optionObject == null)
     {
         throw new ArgumentNullException("Parameter cannot be null", "optionObject");
     }
     if (formId == null || formId == "")
     {
         throw new ArgumentNullException("Parameter cannot be null or blank.", "formId");
     }
     return(IsFormPresent(optionObject.ToOptionObject2015(), formId));
 }
 /// <summary>
 /// Adds a <see cref="RowObject"/> to a specified <see cref="IFormObject"/> within provided <see cref="IOptionObject"/>.
 /// </summary>
 /// <param name="optionObject"></param>
 /// <param name="formId"></param>
 /// <param name="rowObject"></param>
 /// <returns></returns>
 public static IOptionObject AddRowObject(IOptionObject optionObject, string formId, IRowObject rowObject)
 {
     if (optionObject == null)
     {
         throw new System.ArgumentNullException("Parameter cannot be null.", "optionObject");
     }
     if (formId == null || formId == "")
     {
         throw new System.ArgumentNullException("Parameter cannot be null or blank.", "formId");
     }
     if (rowObject == null)
     {
         throw new System.ArgumentNullException("Parameter cannot be null.", "rowObject");
     }
     return(AddRowObject(optionObject.ToOptionObject2015(), formId, rowObject).ToOptionObject());
 }