Esempio n. 1
0
        public void Validate(MyCollectionSettings myCollectionSettings)
        {
            if (myCollectionSettings.DividerReceived != 2 && myCollectionSettings.DividerReceived != 3)
            {
                myCollectionSettings.Divider = 2;
                OnIncorrectDividerReceived(new ErrorDividerEventArgs {
                    Message = $"Incorrect divider provided: {myCollectionSettings.DividerReceived} , will be used default {myCollectionSettings.Divider}"
                });
            }
            else
            {
                myCollectionSettings.Divider = myCollectionSettings.DividerReceived;
            }

            if (myCollectionSettings.OurTopLimit == 0)
            {
                myCollectionSettings.Divider = 2;
                OnIncorrectDividerReceived(new ErrorDividerEventArgs {
                    Message = $"Incorrect divider provided: {myCollectionSettings.DividerReceived} , will be used default {myCollectionSettings.Divider}"
                });
            }
            else
            {
                myCollectionSettings.Divider = myCollectionSettings.DividerReceived;
            }
        }
Esempio n. 2
0
 public MyCollection(MyCollectionSettings myCollectionSettings)
 {
     _myCollectionSettings = myCollectionSettings;
 }