• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Registration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: a_AddValid

 public void a_AddValid()
 {
     var response = client.AddRegistration(entity);
     WasSuccessfulTest(response);
     Assert.True(response.Data.id > 0);
     Assert.True(response.Data.data_saved.id == response.Data.id);
     entity = response.Data.data_saved;
 }
开发者ID:NickLarsen,项目名称:RegPointApi.NET,代码行数:8,代码来源:RegistrationTests.cs


示例17: ReplaceOriginalExpression

        private void ReplaceOriginalExpression(Registration decoratorRegistration)
        {
            this.e.Expression = decoratorRegistration.BuildExpression(this.e.InstanceProducer);

            this.e.ReplacedRegistration = decoratorRegistration;

            this.e.InstanceProducer.IsDecorated = true;
        }
开发者ID:virasak,项目名称:SimpleInjector,代码行数:8,代码来源:ServiceDecoratorExpressionInterceptor.cs


示例18: ValidateTemplateRegistrationAfterRegister

 public void ValidateTemplateRegistrationAfterRegister(Registration registration)
 {
     ValidateTemplateRegistration(registration);
     Assert.IsNotNull(registration.RegistrationId);
     // TODO: Uncomment when .Net Runtime implements installationID
     //Assert.IsTrue(registration.Tags.Contains(zumoInstallationId));
     //Assert.AreEqual(registration.Tags.Count(), DefaultTags.Length + 1);
 }
开发者ID:jwallra,项目名称:azure-mobile-services-test,代码行数:8,代码来源:PushTestUtility.cs


示例19: Execute

 internal override void Execute()
 {
     var cmdlet = (ReceiveTmxTestTaskCommand)Cmdlet;
     var clientSettings = ClientSettings.Instance;
     clientSettings.StopImmediately = false;
     
     var taskLoader = new TaskLoader(new RestRequestCreator());
     // 20141020 squeezing a task to its proxy
     ITestTask task = null;
     // ITestTaskProxy task = null;
     // ITestTaskCodeProxy task = null;
     
     // temporarily
     // TODO: to a template method
     var startTime = DateTime.Now;
     while (!clientSettings.StopImmediately) {
         
         // TODO: move to aspect
         try {
             task = taskLoader.GetCurrentTask();
         }
         catch (ClientNotRegisteredException) {
             if (Guid.Empty != ClientSettings.Instance.ClientId && string.Empty != ClientSettings.Instance.ServerUrl) {
                 var registration = new Registration(new RestRequestCreator());
                 ClientSettings.Instance.ClientId = registration.SendRegistrationInfoAndGetClientId(ClientSettings.Instance.CurrentClient.CustomString);
             }
             
             // TODO: AOP
             Trace.TraceWarning("ReceiveTestTaskCommand.1");
             // temporary
             Trace.TraceWarning("ClientNotRegisteredException");
             
             throw;
         }
         catch (Exception e) {
             // NullreferenceException
             
             // TODO: AOP
             Trace.TraceWarning("ReceiveTestTaskCommand.2");
             // temporary
             Trace.TraceWarning(e.Message);
         }
         
         if (null != task)
             break;
         
         if (!cmdlet.Continuous)
             if ((DateTime.Now - startTime).TotalSeconds >= cmdlet.Seconds)
                 throw new Exception("Failed to receive a task in " + cmdlet.Seconds + " seconds");
         
         System.Threading.Thread.Sleep(Preferences.ReceivingTaskSleepIntervalMilliseconds);
     }
     
     clientSettings.StopImmediately = false;
     clientSettings.CurrentTask = task;
     
     cmdlet.WriteObject(task);
 }
开发者ID:MatkoHanus,项目名称:STUPS,代码行数:58,代码来源:ReceiveTestTaskCommand.cs


示例20: InitializationContext

        internal InitializationContext(InstanceProducer producer, Registration registration)
        {
            // producer will be null when a user calls Registration.BuildExpression() directly, instead of
            // calling InstanceProducer.BuildExpression() or InstanceProducer.GetInstance(). 
            Requires.IsNotNull(registration, nameof(registration));

            this.Producer = producer;
            this.Registration = registration;
        }
开发者ID:khellang,项目名称:SimpleInjector,代码行数:9,代码来源:InitializationContext.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RegistrationContext类代码示例发布时间:2022-05-24
下一篇:
C# RegisterViewModel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap