/// <summary> /// Sets the Get member variables, this needs to happens thrid. /// </summary> /// <param name="cVariables">get member variables</param> /// <returns>FluentModelDisambiguatedMemberVariables</returns> public FluentModelDisambiguatedMemberVariables WithGetMemberVariable(FluentModelMemberVariablesForGet gVariables) { if (this.cVariables.IsCompatibleWith(gVariables) && this.uVariables.IsCompatibleWith(gVariables)) { this.gVariables = gVariables; } return(this); }
/// <summary> /// Creates FluentModelDisambiguatedMemberVariables. /// </summary> public FluentModelDisambiguatedMemberVariables() { // Initialize create, update and get variables to empty memeber variable collection // Each of this will be overriden "With[Create|Update|Get]MemberVariable()" methods // this.cVariables = new FluentModelMemberVariablesForCreate(); this.uVariables = new FluentModelMemberVariablesForUpdate(); this.gVariables = new FluentModelMemberVariablesForGet(); // this.memberVariablesForCreate = null; this.memberVariablesForUpdate = null; this.disambiguated = false; }
protected CreatableUpdatableModel(FluentModelMemberVariablesForCreate cVariables, FluentModelMemberVariablesForUpdate uVariables, FluentModelMemberVariablesForGet gVariable, StandardModel standardModel) { this.StandardModel = standardModel ?? throw new ArgumentException(nameof(standardModel)); // this.cVariables = cVariables; this.uVariables = uVariables; this.gVariable = gVariable; // this.DisambiguatedMemberVariables = new FluentModelDisambiguatedMemberVariables() .WithCreateMemberVariable(this.cVariables) .WithUpdateMemberVariable(this.uVariables) .WithGetMemberVariable(this.gVariable) .Disambiguate(); // this.cVariables.SetDisambiguatedMemberVariables(this.DisambiguatedMemberVariables); this.uVariables.SetDisambiguatedMemberVariables(this.DisambiguatedMemberVariables); }
protected CreatableUpdatableModel(FluentMethodGroup fluentMethodGroup, FluentModelMemberVariablesForCreate cVariables, FluentModelMemberVariablesForUpdate uVariables, FluentModelMemberVariablesForGet gVariable, string innerModelTypeName) { this.FluentMethodGroup = fluentMethodGroup; // this.cVariables = cVariables; this.uVariables = uVariables; this.gVariable = gVariable; // this.innerModelTypeName = innerModelTypeName; // this.DisambiguatedMemberVariables = new FluentModelDisambiguatedMemberVariables() .WithCreateMemberVariable(this.cVariables) .WithUpdateMemberVariable(this.uVariables) .WithGetMemberVariable(this.gVariable) .Disambiguate(); // this.cVariables.SetDisambiguatedMemberVariables(this.DisambiguatedMemberVariables); this.uVariables.SetDisambiguatedMemberVariables(this.DisambiguatedMemberVariables); }