This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DbJunkFinder | |
| { | |
| private List<string> _patterns; | |
| private readonly IDbJunkFinderOperation _operation; | |
| public DbJunkFinder() | |
| { | |
| this._operation = new DbJunkFinderOperation(); | |
| this._patterns = Patterns.GetCleanUpPatterns(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface ICommand | |
| { | |
| void Execute(); | |
| } | |
| //Command | |
| public abstract class CommandPerson | |
| : ICommand | |
| { | |
| private readonly IRepository _personRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface ISalaryCalc | |
| { | |
| decimal GetSalary(); | |
| } | |
| public class EngineerSalaryCalc | |
| :ISalaryCalc | |
| { | |
| public decimal GetSalary() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface ITransferOperation | |
| { | |
| bool DoAccounting(); | |
| void Transfer(); | |
| } | |
| public class ForeignPayment | |
| :ITransferOperation | |
| { | |
| public bool DoAccounting() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public enum ProductStatus | |
| { | |
| Approvaled, | |
| ExistInStock, | |
| NotExistInStock, | |
| SoldOut, | |
| Delivered | |
| } | |
| public class Product |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public delegate void StatusChangeEventHandler(MessageStatus newStatus); | |
| public enum MessageStatus { Approved , InApproval , Executed } | |
| public class Message | |
| { | |
| private MessageStatus messageStatus; | |
| public MessageStatus MessageStatus | |
| { | |
| get { return messageStatus; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //interface the all observer classes should implement | |
| public interface IObserver<TObject> | |
| { | |
| void Notify(TObject obj); | |
| } | |
| //interface that all observable classes should implement | |
| public interface IObservable<TObject> | |
| { | |
| void Register(IObserver<TObject> observer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class StringValueAttribute | |
| : Attribute | |
| { | |
| public string StringValue { get; protected set; } | |
| public StringValueAttribute(string value) | |
| { | |
| StringValue = value; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Data.OracleClient; | |
| using System.Text.RegularExpressions; | |
| namespace AccessBlock | |
| { | |
| public abstract class OracleDbOperation | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class ObjSerilizator | |
| { | |
| public static TData DeserializeFromString<TData>(string settings) | |
| { | |
| byte[] b = Convert.FromBase64String(settings); | |
| using (var stream = new MemoryStream(b)) | |
| { | |
| var formatter = new BinaryFormatter(); | |
| stream.Seek(0, SeekOrigin.Begin); | |
| return (TData)formatter.Deserialize(stream); |