public void SetState(GatheringSettings settings, Object state) { switch (settings.SearchOrigin) { case GatheringSettings.SearchOriginType.Direct: switch (settings.SearchGroup) { case GatheringSettings.SearchGroupType.Follow: DirectStateFollow = state as SingleGatheringState; break; case GatheringSettings.SearchGroupType.Follower: DirectStateFollower = state as SingleGatheringState; break; default: break; } break; case GatheringSettings.SearchOriginType.Indirect: switch (settings.SearchGroup) { case GatheringSettings.SearchGroupType.Follow: IndirectStateFollow = state as IndirectGatheringState; break; case GatheringSettings.SearchGroupType.Follower: IndirectStateFollower = state as IndirectGatheringState; break; default: break; } break; case GatheringSettings.SearchOriginType.Specified: switch (settings.SearchGroup) { case GatheringSettings.SearchGroupType.Follow: SpecifiedStateFollow = state as SingleGatheringState; break; case GatheringSettings.SearchGroupType.Follower: SpecifiedStateFollower = state as SingleGatheringState; break; default: break; } break; default: break; } return; }
public GatheringHistory(IndirectGatheringState indirectStateFollow, IndirectGatheringState indirectStateFollower, SingleGatheringState directStateFollow, SingleGatheringState directStateFollower, SingleGatheringState specifiedStateFollow, SingleGatheringState specifiedStateFollower) { IndirectStateFollow = indirectStateFollow; IndirectStateFollower = indirectStateFollower; DirectStateFollow = directStateFollow; DirectStateFollower = directStateFollower; SpecifiedStateFollow = specifiedStateFollow; SpecifiedStateFollower = specifiedStateFollower; }