Пример #1
0
        public override string ProcessData(string data)
        {
            string targetFileName = base.GetParam((int)ConfigurationEnum.DestinationPath).Value;
            string userName       = base.GetParam((int)ConfigurationEnum.UserName).Value;
            string password       = base.GetParam((int)ConfigurationEnum.Password).Value;
            string url            = base.GetParam((int)ConfigurationEnum.Url).Value;

            DummyAuthetificationProxy daProxy = new DummyAuthetificationProxy();
            bool authetificated = daProxy.Authentificate(userName, userName);

            if (!authetificated)
            {
                throw new AuthentificateExceptinCW(new Exception("Dummy Cloud proxy not authetificated."));
            }

            daProxy.WriteStringFile(targetFileName, data);


            return(string.Empty);
        }
Пример #2
0
        public override string ProcessData(string data)
        {
            string sourceFileName = base.GetParam((int)ConfigurationEnum.SourcePath).Value;
            string userName       = base.GetParam((int)ConfigurationEnum.UserName).Value;
            string password       = base.GetParam((int)ConfigurationEnum.Password).Value;
            string url            = base.GetParam((int)ConfigurationEnum.Url).Value;


            if (daProxy == null)
            {
                daProxy = new DummyAuthetificationProxy();
                bool authetificated = daProxy.Authentificate(userName, userName);

                if (!authetificated)
                {
                    throw new AuthentificateExceptinCW(new Exception("Dummy Cloud proxy not authetificated."));
                }
            }

            string outpuData = daProxy.GetStringFile(sourceFileName);


            return(outpuData);
        }