Пример #1
0
 /// <summary>
 /// Checks whether the given value satisfies the specified constraint;
 /// if not, throws <see cref="PostConditionException" /> with the
 /// specified <paramref name="exceptionMessage" /> (if any) and a
 /// BlueSky-only mini-stack trace.
 /// </summary>
 public static void That(
     object value,
     IConstraint constraint,
     string exceptionMessage = null)
 {
     Hel.per <ConstraintCheckHelper>().AssertConstraintIsSatisfied(value, constraint, exceptionMessage, false);
 }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("favicon.ico");
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            Hel.per <RouteHelper>().RegisterRoutes(routes);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new[] { "BlueSky.Commerce.WebUI.Controllers" }
                );
        }
Пример #3
0
        static void Main(string[] args)
        {
            var key = Encoding.ASCII.GetBytes("Blue Sky Yazılım");
            var iv  = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

            var text = Hel.per <SymmetricEncryptionHelper>().Encrypt("Osman YILDIRIM", key, iv, SymmetricEncryptionAlgorithm.Rijndael);

            Console.WriteLine(text);

            var text2 = Hel.per <SymmetricEncryptionHelper>().Decrypt(text, key, iv, SymmetricEncryptionAlgorithm.Rijndael).Replace("\0", "");

            Console.WriteLine(text2);

            Console.Read();
        }