当前位置: 首页>>代码示例>>C#>>正文


C# Registration类代码示例

本文整理汇总了C#中Registration的典型用法代码示例。如果您正苦于以下问题:C# Registration类的具体用法?C# Registration怎么用?C# Registration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Registration类属于命名空间,在下文中一共展示了Registration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Unregister

 /// <summary>
 /// Unregister the profiler using %SystemRoot%\system\regsvr32.exe
 /// </summary>
 /// <param name="registration">User - use the /n /i:user switches</param>
 public static void Unregister(Registration registration)
 {
     if (registration == Registration.Normal || registration == Registration.User)
     {
         ExecuteRegsvr32(registration == Registration.User, false);
     }
 }
开发者ID:AtwooTM,项目名称:opencover,代码行数:11,代码来源:ProfilerRegistration.cs

示例2: btnRegister_Click

        /* Register Button */
        private void btnRegister_Click(object sender, EventArgs e)
        {
            try
            {
                custID = Convert.ToInt32(cmbCustomer.SelectedValue);
                prodCode = cmbProduct.SelectedValue.ToString();
                regDate = DTPickerRegistration.Value;

                Registration rego = new Registration(custID, prodCode, regDate);
                //RegistrationDB.AddRegistration(rego);
                if (RegistrationDB.AddRegistration(rego) == true)
                {
                    MessageBox.Show("Registration Complete.");
                    clearForm();
                }
                else
                {
                    MessageBox.Show("Registration Failed.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString());
            }
        }
开发者ID:B-McLeod,项目名称:Tafe_As4,代码行数:26,代码来源:frmRegisterProducts.cs

示例3: ValidateTemplateRegistrationAfterRegister

 public void ValidateTemplateRegistrationAfterRegister(Registration registration, string zumoInstallationId)
 {
     ValidateTemplateRegistration(registration);
     Assert.IsNotNull(registration.RegistrationId);
     Assert.IsTrue(registration.Tags.Contains(zumoInstallationId));
     Assert.AreEqual(registration.Tags.Count(), DefaultTags.Length + 1);
 }
开发者ID:KevinOrtman,项目名称:azure-mobile-services,代码行数:7,代码来源:PushTestUtility.cs

示例4: GetInstance

        public object GetInstance(Container container, Registration reg)
        {
            if (reg.Instance == null)
                reg.Instance = reg.CreateInstance(container);

            return reg.Instance;
        }
开发者ID:jlaanstra,项目名称:Munq,代码行数:7,代码来源:ContainerLifetime.cs

示例5: SendInvitationEmail

        public static void SendInvitationEmail(string username, string sendername, string email,Guid teamid)
        {
            try
            {
                Registration reg = new Registration();
                string tid = reg.MD5Hash(email);
                MailHelper mailhelper = new MailHelper();
                string mailpath = HttpContext.Current.Server.MapPath("~/Layouts/Mails/SendInvitation.htm");
                string html = File.ReadAllText(mailpath);
                string fromemail = ConfigurationManager.AppSettings["fromemail"];
                string usernameSend = ConfigurationManager.AppSettings["username"];
                string host = ConfigurationManager.AppSettings["host"];
                string port = ConfigurationManager.AppSettings["port"];
                string pass = ConfigurationManager.AppSettings["password"];
                string urllogin = "http://woosuite.socioboard.com/Default.aspx";
                string registrationurl = "http://woosuite.socioboard.com/Registration.aspx?tid="+teamid;
                string Body = mailhelper.InvitationMail(html, username, sendername, "", urllogin, registrationurl);
                string Subject = "You've been Invited to " + username + " Moople Social Account";
                //   MailHelper.SendMailMessage(host, int.Parse(port.ToString()), fromemail, pass, email, string.Empty, string.Empty, Subject, Body);

                MailHelper.SendSendGridMail(host, Convert.ToInt32(port), fromemail, "", email, "", "", Subject, Body, usernameSend, pass);

            }
            catch (Exception ex)
            {

                logger.Error(ex.Message);
            }
        }
开发者ID:utkarshx,项目名称:socioboard,代码行数:29,代码来源:MailSender.cs

示例6: Validator

        protected override bool Validator(Registration.Registration registration, DateTime datetime)
        {
            bool drive = true;

            int position = registration.Number.Length -1;

            String digit = registration.Number.Substring(position,1);

            string weekday = datetime.DayOfWeek.ToString();

            if (weekday == WeekDay.week_day.Monday.ToString() && (digit == "1" || digit == "2"))
            {
                drive = false;
            }
            else if (weekday == WeekDay.week_day.Tuesday.ToString() && (digit == "3" || digit == "4"))
            {
                drive = false;
            }
            else if (weekday == WeekDay.week_day.Wednesday.ToString() && (digit == "5" || digit == "6"))
            {
                drive = false;
            }
            else if (weekday == WeekDay.week_day.Thursday.ToString() && (digit == "7" || digit == "8"))
            {
                drive = false;
            }
            else if (weekday == WeekDay.week_day.Friday.ToString() && (digit == "9" || digit == "0"))
            {
                drive = false;
            }

            return drive;
        }
开发者ID:alainosorio,项目名称:Pico-y-Placa,代码行数:33,代码来源:EcuadorSchedule.cs

示例7: Login

        public string Login(string EmailId, string Password)
        {
            //
            try
            {
                UserRepository userrepo = new UserRepository();
                Registration regObject = new Registration();
                User user = userrepo.GetUserInfo(EmailId, regObject.MD5Hash(Password));

                if (user != null)
                {
                    return new JavaScriptSerializer().Serialize(user);
                }
                else
                {
                    return "Invalid user name or password";
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return null;
            }
        }
开发者ID:JBNavadiya,项目名称:socioboard,代码行数:25,代码来源:UserService.asmx.cs

示例8: ValidateTemplateRegistration

        public void ValidateTemplateRegistration(Registration registration)
        {
            var mpnsTemplateRegistration = (MpnsTemplateRegistration)registration;
            Assert.AreEqual(mpnsTemplateRegistration.BodyTemplate, BodyTemplate);

            foreach (KeyValuePair<string, string> header in DefaultHeaders)
            {
                Assert.IsTrue(mpnsTemplateRegistration.MpnsHeaders.ContainsKey(header.Key));
                Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders[header.Key], header.Value);
            }

            foreach (KeyValuePair<string, string> header in DetectedHeaders)
            {
                Assert.IsTrue(mpnsTemplateRegistration.MpnsHeaders.ContainsKey(header.Key));
                Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders[header.Key], header.Value);
            }

            Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders.Count, DefaultHeaders.Count + DetectedHeaders.Count);

            foreach (string tag in DefaultTags)
            {
                Assert.IsTrue(registration.Tags.Contains(tag));
            }

            Assert.AreEqual(mpnsTemplateRegistration.Name, DefaultToastTemplateName);
            Assert.AreEqual(mpnsTemplateRegistration.TemplateName, DefaultToastTemplateName);
        }
开发者ID:KevinOrtman,项目名称:azure-mobile-services,代码行数:27,代码来源:PushTestUtility.cs

示例9: SubscribeToService

        private void SubscribeToService()
        {
            try
            {
                // Get User
                User msgUser = new User();

                var msg = new GetUserMessage(this, message =>
                {
                    msgUser = message;
                });

                Messenger.Default.Send(msg);

                // Create Registration
                Registration registration = new Registration();
                registration.URI = httpChannel.ChannelUri.ToString();
                registration.UserId = msgUser.UserId;

                // Register
                CapitalServiceClient client = new CapitalServiceClient();
                client.RegisterCompleted += (s, e) => { };
                client.RegisterAsync(registration);
            }
            catch
            {

            }
        }
开发者ID:Newbourne,项目名称:CAPITAL,代码行数:29,代码来源:NotificationService.cs

示例10: ValidateSchedule

        public String ValidateSchedule(Schedule.Schedule schedule, Registration.Registration vehicle)
        {
            String information = "";

            try
            {

                if (comboBoxCountry.SelectedItem.ToString() == Registration.Country.country_name.Ecuador.ToString())
                {
                    vehicle = new Registration.EcuadorRegistration(this.textBoxRegistration.Text);

                    schedule = new Schedule.EcuadorSchedule();

                    DateTime dt = new DateTime();

                    dt = Convert.ToDateTime(dateTimePicker.Text);

                    if (!(schedule as Schedule.EcuadorSchedule).EcuadorValidator(vehicle, dt))

                        information = "El vehículo con matrícula " + vehicle.Number + " no puede conducir en la ciudad de Quito entre las las 7:00 y las 9:30 en la mañana y entre las 16:00 y las 19:30 en la tarde y noche.";
                    else
                        information = "El vehículo con matrícula " + vehicle.Number + " puede conducir libremente en la ciudad de Quito en la fecha seleccionada.";
                }
                else
                    information = "Información solo disponible para " + Registration.Country.country_name.Ecuador.ToString();

            }
            catch (Exception exception)
            {
                information = exception.Message;
            }

            return information;
        }
开发者ID:alainosorio,项目名称:Pico-y-Placa,代码行数:34,代码来源:PicoPlaca.cs

示例11: HarmonizeConnector

        public HarmonizeConnector(Registration.IFactory registrationFactory, With.Messaging.Client.IEndpoint messagingEndpoint)
        {
            _registrationFactory = registrationFactory;
            _messagingEndpoint = messagingEndpoint;

            _registrations = new Registration.Collection();
        }
开发者ID:jamesleech,项目名称:Harmonize,代码行数:7,代码来源:HarmonizeConnector.cs

示例12: ValidateTemplateRegistration

        public void ValidateTemplateRegistration(Registration registration)
        {
            var mpnsTemplateRegistration = (MpnsTemplateRegistration)registration;
            Assert.AreEqual(mpnsTemplateRegistration.BodyTemplate, BodyTemplate);

            foreach (KeyValuePair<string, string> header in DefaultHeaders)
            {
                string foundKey = mpnsTemplateRegistration.MpnsHeaders.Keys.Single(s => s.ToLower() == header.Key.ToLower());
                Assert.IsNotNull(foundKey);
                Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders[foundKey], header.Value);
            }

            foreach (KeyValuePair<string, string> header in DetectedHeaders)
            {

                string foundKey = mpnsTemplateRegistration.MpnsHeaders.Keys.Single(s => s.ToLower() == header.Key.ToLower());
                Assert.IsNotNull(foundKey);
                Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders[foundKey], header.Value);
            }

            Assert.AreEqual(mpnsTemplateRegistration.MpnsHeaders.Count, DefaultHeaders.Count + DetectedHeaders.Count);

            foreach (string tag in DefaultTags)
            {
                Assert.IsTrue(registration.Tags.Contains(tag));
            }

            Assert.AreEqual(mpnsTemplateRegistration.Name, DefaultToastTemplateName);
            Assert.AreEqual(mpnsTemplateRegistration.TemplateName, DefaultToastTemplateName);
        }
开发者ID:jwallra,项目名称:azure-mobile-services-test,代码行数:30,代码来源:PushTestUtility.cs

示例13: AddRegister

    private string[] AddRegister()
    {
        var regs = new Registration()
                                {
                                    Adress = txtAdres.Text,
                                    BirthDate = txtDogumTar.Text,
                                    BirthPlace = txtDogumYeri.Text,
                                    Chapter = txtBolum.Text,
                                    FatherJob = txtBabaMeslek.Text,
                                    FatherName = txtBabaMeslek.Text,
                                    FatherTNo = txtBabaTCKNo.Text,
                                    MailAdress = txtMail.Text,
                                    MobileNumber = txtCepNo.Text,
                                    MotherJob = txtAnneMeslek.Text,
                                    MotherName = txtAnneAdi.Text,
                                    Name = txtAd.Text,
                                    Number = txtTel.Text,
                                    SchoolLeaver = txtMezunOkul.Text,
                                    Surname = txtSoyad.Text,
                                    TCKNo = txtTckNo.Text
                                };
        string[] returnResult = _registrationBusiness.AddRegistrtaion(regs);

        return returnResult;
    }
开发者ID:hanifitayfur,项目名称:FASML,代码行数:25,代码来源:Registration.aspx.cs

示例14: Register

        // Register a node address for a given mesh ID
        public int Register(string meshId, PeerNodeAddress nodeAddress)
        {
            bool newMeshId = false;
            int registrationId;
            Registration registration = new Registration(meshId, nodeAddress);

            // Add the new registration to the registration table; update meshIdTable with the newly registered nodeAddress
            lock (registrationTable)
            {
                registrationId = nextRegistrationId++;
                lock (meshIdTable)
                {
                    // Update the meshId table
                    Dictionary<int, PeerNodeAddress> addresses;
                    if (!meshIdTable.TryGetValue(meshId, out addresses))
                    {
                        // MeshID doesn't exist and needs to be added to meshIdTable
                        newMeshId = true;
                        addresses = new Dictionary<int, PeerNodeAddress>();
                        meshIdTable[meshId] = addresses;
                    }
                    addresses[registrationId] = nodeAddress;

                    // Add an entry to the registration table
                    registrationTable[registrationId] = new Registration(meshId, nodeAddress);
                }
            }
            if (newMeshId)
                Console.WriteLine("Registered new meshId {0}", meshId);
            return registrationId;
        }
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:32,代码来源:service.cs

示例15: CheckEquality

		public void CheckEquality( Registration sut, string key, string other )
		{
			sut.Key = key;

			Assert.True( sut.Equals( key ) );

			Assert.False( sut.Equals( other ) );
		} 
开发者ID:DevelopersWin,项目名称:VoteReporter,代码行数:8,代码来源:RegistrationTests.cs


注:本文中的Registration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。