public MultyException Initialize() { MultyException error = new MultyException(); if (!this.IsInitialized) { this.BlockType.ForEach(x => error += x.Initialize()); this.Block.ForEach(x => error += x.Initialize()); if (this.generator_external != null) { error += this.generator_external.Initialize(); if (generator_external.IsInitialized) { this.generator = Sudoku.Generate_External; } } if (this.generator == null) { //error += ""; //NNBB; todo; } } else { error += Alist.Constant.Exception.RepeatInitialization; } return(error); }
public MultyException Initialize() { MultyException error = new MultyException(); if (!this.IsInitialized) { if (this.Father == null) { error += Constant.Exception.BlockSudokuNotSet; } else { if (this.blockType == null) { try { this.blockType = this.Father.GetBlockType(this.TypeId); this.IsInitialized = true; } catch (ApplicationException exception) { error += exception; this.IsInitialized = false; } } } } else { error += Alist.Constant.Exception.RepeatInitialization; } return(error); }
public MultyException Finilize() { MultyException error = new MultyException(); if (this.IsInitialized) { this.blockType = null; this.child = null; } else { error += Alist.Constant.Exception.RepeatFinalization; } return(error); }
public MultyException Finilize() { MultyException error = new MultyException(); if (this.IsInitialized) { this.Block.ForEach(x => x.Finilize()); this.BlockType.ForEach(x => x.Finilize()); this.Number = null; this.Block = null; this.BlockType = null; } else { error += Alist.Constant.Exception.RepeatFinalization; } return(error); }
public MultyException Initialize() { MultyException error = new MultyException(); if (!this.IsInitialized) { if ((this.Checker == null) && (this.checkerExternal == null)) { error += Constant.Exception.BlockTypeCheckerNotSet; this.Checker = CheckMethod_Standart; } if ((this.Generator == null) && (this.generatorExternal == null)) { this.Generator = GenerateMethod_Standart; } bool success = true; if (this.checkerExternal != null) { error += this.checkerExternal.Initialize(); success = success ? this.checkerExternal.IsInitialized : success; } if (this.generatorExternal != null) { error += this.generatorExternal.Initialize(); success = success ? this.generatorExternal.IsInitialized : success; } this.IsInitialized = success; } else { error += Alist.Constant.Exception.RepeatInitialization; } return(error); }
public MultyException Finilize() { MultyException error = new MultyException(); if (this.IsInitialized) { if (this.checkerExternal != null) { error += this.checkerExternal.Finilize(); } if (this.generatorExternal != null) { error += this.generatorExternal.Finilize(); } this.IsInitialized = false; } else { error += Alist.Constant.Exception.RepeatFinalization; } return(error); }
public MultyException Initialize() { MultyException error = new MultyException(); if (!this.IsInitialized) { this.BlockType.ForEach(x => error += x.Initialize()); this.Block.ForEach(x => error += x.Initialize()); if (this.generator_external != null) { error += this.generator_external.Initialize(); if (generator_external.IsInitialized) this.generator = Sudoku.Generate_External; } if (this.generator == null) { //error += ""; //NNBB; todo; } } else { error += Alist.Constant.Exception.RepeatInitialization; } return error; }
public MultyException Finilize() { MultyException error = new MultyException(); if (this.IsInitialized) { this.Block.ForEach(x => x.Finilize()); this.BlockType.ForEach(x => x.Finilize()); this.Number = null; this.Block = null; this.BlockType = null; } else { error += Alist.Constant.Exception.RepeatFinalization; } return error; }