Пример #1
0
        public static TcpStream Create(string server = null, int port = 80)
        {
            var tcpStream = TikoContainer.Resolve <TcpStream>();

            tcpStream.Initialize(server, port);
            return(tcpStream);
        }
Пример #2
0
        public static HttpClient Create()
        {
            var httpClient = TikoContainer.Resolve <HttpClient>();

            httpClient.Initialize();
            return(httpClient);
        }
Пример #3
0
        public static FileStream Create(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
        {
            var fileStream = TikoContainer.Resolve <FileStream> ();

            fileStream.Initialize(path, mode, access, share, bufferSize);
            return(fileStream);
        }
Пример #4
0
        public static Timer Create(TimeSpan interval)
        {
            var timer = TikoContainer.Resolve <Timer>();

            timer.Initialize(interval);
            return(timer);
        }
Пример #5
0
        public static Timer Create()
        {
            var timer = TikoContainer.Resolve <Timer>();

            timer.Initialize();
            return(timer);
        }
Пример #6
0
        public static FileInfo Create(PathInfo location, string fileName)
        {
            var fileInfo = TikoContainer.Resolve <FileInfo>().Clone();

            fileInfo.Initialize(location, fileName);
            return(fileInfo);
        }
Пример #7
0
        public static RNGCryptoServiceProvider Create()
        {
            var cryptoServiceProvider = TikoContainer.Resolve <RNGCryptoServiceProvider> ();

            cryptoServiceProvider.Initialize();
            return(cryptoServiceProvider);
        }
Пример #8
0
        public static FileStream Create(FileInfo info, FileMode access)
        {
            var fileStream = TikoContainer.Resolve <FileStream>();

            fileStream.Initialize(info, access);
            return(fileStream);
        }
Пример #9
0
        public static PathInfo Create(PathInfo location, params string[] sublocation)
        {
            var storageInfo = TikoContainer.Resolve <PathInfo>().Clone();

            storageInfo.Initialize(location, sublocation);
            return(storageInfo);
        }
Пример #10
0
 public static SeedGenerator Create()
 {
     return(TikoContainer.Resolve <SeedGenerator>());
 }