public string GetSimpleInvalidXml()
        {
            string            invalidCharString = StringGen.GetIllegalXmlString(10, true);
            ManagedNodeWriter mn = new ManagedNodeWriter();

            mn.PutDecl();
            mn.OpenElement("�");
            mn.CloseElement();
            mn.PutText(invalidCharString);
            mn.PutEndElement();
            return(mn.GetNodes());
        }
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="typeResolver">
        /// </param>
        public SynthesizedCtorSBytePtrMethod(ITypeResolver typeResolver)
            : base("CtorSBytePtr", typeResolver.System.System_String, typeResolver.System.System_String)
        {
            byte[]             code;
            IList <object>     tokenResolutions;
            IList <IType>      locals;
            IList <IParameter> parameters;

            StringGen.GetCtorSBytePtr(typeResolver, out code, out tokenResolutions, out locals, out parameters);

            this._methodBody = new SynthesizedMethodBodyDecorator(
                null,
                locals,
                code);

            this._parameters       = parameters;
            this._tokenResolutions = tokenResolutions;
        }
Esempio n. 3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        UserItemToRecover ValidationItem = LoginAndMailValidation(TextBox1.Text, TextBox2.Text);

        if (ValidationItem != null)
        {
            String newPassword      = StringGen.GenString();
            PasswordSaltAndHash sah = new PasswordSaltAndHash(newPassword);
            String query            = SendPasswordToDatabase(sah.getPasswordSalt(), sah.getPasswordHash(), ValidationItem);
            try
            {
                SQLConnector.ProcessQuery(query);
                Panel1.Visible = false;
                Panel2.Visible = true;
                Label1.Text    = "<p class=\"center\">Hasło zostało zmienione pomyślnie. Nowe hasło brzmi: " + newPassword + "</p>";
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                Panel1.Visible = false;
                Panel2.Visible = true;
                Label1.Text    = "<p class=\"center\">Baza wygenerowała następującego errora: " + ex.Message + "</p>";
            }
        }
    }
Esempio n. 4
0
 public void WriteFile()
 {
     Console.WriteLine("Running Thread {0} ...", Thread.CurrentThread.ManagedThreadId);
     StringGen oursg = new StringGen();
     oursg.buildDummyFile("test" + iteration + ".txt");
 }