Esempio n. 1
0
        protected virtual void Dispose(bool xi_disposing)
        {
            if (xi_disposing)
            {
                // free managed objects
                ContextAttr = null;
                FactoryAttr = null;
            }

            // free unmanaged objects, including base class
            // set large fields to null (de-reference)
        }
Esempio n. 2
0
        public static void TestRes()
        {
            ail.net.parser.Context context = new ail.net.parser.Context();

//            FileInfo fi = new FileInfo("c:\\tmp\\Simulation.xml");
//            StreamReader reader = new StreamReader("c:\\tmp\\Simulation.xml");
            StreamReader reader = new StreamReader("c:\\tmp\\e.txt");

            StringReader sreader = new StringReader("test");

            context.Load("test", ail.net.parser.Context.ELoadMedia.eMediaString);
            context.Load("c:\\tmp\\e.txt", ail.net.parser.Context.ELoadMedia.eMediaFile);

            int r = ail.net.framework.Functor.Align(131, 16);
            int n = ail.net.framework.Functor.GetNextSize(131);

            string assembly_name = Assembly.GetExecutingAssembly().GetName().Name;
            string base_name     = string.Format("{0}.BaseResources", assembly_name);
            string s1            = ail.net.application.res.StringManager.EmptyStringException("q", "f1", 10);

            try
            {
                ail.net.framework.Assert.NonNullReference(null, "s");
            }
            catch (Exception ex)
            {
                string m = ex.Message;
            }
            try
            {
                string s = "";
                ail.net.framework.Assert.NonEmptyString(s, "s");
            }
            catch (Exception ex)
            {
                string m = ex.Message;
            }
            try
            {
                string s = "";
                ail.net.framework.Assert.ExpectedType(s, "s", 5.GetType());
            }
            catch (Exception ex)
            {
                string m = ex.Message;
            }
        }