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

C# IUser类代码示例

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

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



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

示例1: NetAsyncDownloader

 /// <summary>
 /// Returns a perfectly boring NetAsyncDownloader.
 /// </summary>
 public NetAsyncDownloader(IUser user)
 {
     User = user;
     downloads = new List<NetAsyncDownloaderDownloadPart>();
     modules = new List<CkanModule>();
     complete_or_canceled = new ManualResetEvent(false);
 }
开发者ID:Rusk85,项目名称:CKAN,代码行数:10,代码来源:NetAsyncDownloader.cs


示例2: Log

 /// <summary>
 /// Logs the specified <see cref="System.Exception"/> and the user information.
 /// </summary>
 /// <param name="exception">The <see cref="System.Exception"/> to log.</param>
 /// <param name="user">The user information to log.</param>
 public void Log(Exception exception, IUser user)
 {
     if (!(exception is ThreadAbortException))
     {
         Log(LogLevel.Error, exception.ToString(), user);
     }
 }
开发者ID:NLADP,项目名称:ADF,代码行数:12,代码来源:EventLogProvider.cs


示例3: HasTriggered

 public override bool HasTriggered(IUser user, IDocumentSession session)
 {
     var number = session.Query<Praise>()
                        .Count(praise => praise.EventDate >= DateTime.Today.AddDays(0 - Config.PeriodDays)
                                      && praise.SubjectUser.UserId == user.Id);
     return Config.NumberInPeriod <= number;
 }
开发者ID:andyevans2000,项目名称:Illuminate,代码行数:7,代码来源:PraiseInferenceType.cs


示例4: AssertThatUserIsNilsPetterSundgren

		public static void AssertThatUserIsNilsPetterSundgren( IUser user )
		{
			Assert.That( user.FirstName, Is.EqualTo( "Nils-Petter" ) );
			Assert.That( user.LastName, Is.EqualTo( "Sundgren" ) );
			Assert.That( user.EmailAddress, Is.EqualTo( "[email protected]" ) );
			Assert.That( user.BirthDate.HasValue, Is.EqualTo( false ) );
		}
开发者ID:bmbsqd,项目名称:Bombsquad.DataProxy,代码行数:7,代码来源:TestHelpers.cs


示例5: Edit_Incident_Handler

 public Edit_Incident_Handler(IUser user)
 {
     APF = Australian_Parachute_Federation.Instance;
     //user = APF.Searcher.Find_User("13E98653-675F-44E6-A0A2-E2E40261F8FE");
     //role = APF.Searcher.Find_Role("70CAAFBC-B595-4D98-85CF-FCDC913FDB9D");
     _userInRole = (IUserInRole)APF.Searcher.Find_User_In_Role(user.User_ID);
 }
开发者ID:jennyngoclan,项目名称:Original_APF_Incident_System,代码行数:7,代码来源:Edit_Incident_Handler.cs


示例6: AssertThatUserIsCarlJahnGranqvist

		public static void AssertThatUserIsCarlJahnGranqvist( IUser user )
		{
			Assert.That( user.FirstName, Is.EqualTo( "Carl Jan" ) );
			Assert.That( user.LastName, Is.EqualTo( "Granqvist" ) );
			Assert.That( user.EmailAddress, Is.EqualTo( "[email protected]" ) );
			Assert.That( user.BirthDate.HasValue, Is.EqualTo( false ) );
		}
开发者ID:bmbsqd,项目名称:Bombsquad.DataProxy,代码行数:7,代码来源:TestHelpers.cs


示例7: GetBossBattleFloorService

 public GetBossBattleFloorService(IUser user, ILogger logger, string floorId, string target)
     : base(user, logger)
 {
     this.floorId = floorId;
     this.target = target;
     this.apiActionPath = "tower/battle.php";
 }
开发者ID:reekroo,项目名称:HOCb,代码行数:7,代码来源:GetBossBattleFloorService.cs


示例8: Compute

        public void Compute(IUser user)
        {
            var infos = new DatabaseAccess.DatabaseManager()
                .GetDatabase()
                .GetCollection<SVNInfo>(typeof(SVNInfo).Name)
                .FindAll()                                
                .OrderBy(o => o.Date)
                .ToList();

            var count = 0;
            DateTime initialTime = infos[0].Date.ToUniversalTime();
            for (int i = 1; i < infos.Count; i++)
            {
                var ts = infos[i + 1].Date - initialTime;
                if (ts.Days >= 1 && ts.Days < 2)
                {
                    count++;
                }
                else if (!(ts.Days < 1))
                {
                    count = 0;
                }
                else
                {
                    continue;
                }
                initialTime = infos[i].Date;
                if (count >= 5)
                {
                    Gained = true;
                    break;
                }
            }
            
        }
开发者ID:KobusGamification,项目名称:Gamification,代码行数:35,代码来源:SVNWeekendIntegration.cs


示例9: ConnectStorageStage

 public ConnectStorageStage(IUser user, string ipaddress, int port)
 {
     // TODO: Complete member initialization
     this._User = user;
     this._IpAddress = ipaddress;
     this._Port = port;
 }
开发者ID:jiowchern,项目名称:ItIsNotAGame1-Backend,代码行数:7,代码来源:ConnectStorageStage.cs


示例10: RegisterRemoting

        private void RegisterRemoting()
        {
            {
                try
                {
                    BinaryServerFormatterSinkProvider server_provider = new BinaryServerFormatterSinkProvider();
                    server_provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;

                    BinaryClientFormatterSinkProvider client_provider = new BinaryClientFormatterSinkProvider();
                    IDictionary properties = new Hashtable();

                    properties["port"] = "0";

                    TcpChannel channel = new TcpChannel(properties, client_provider, server_provider);
                    ChannelServices.RegisterChannel(channel, false);

                    user = (IUser)Activator.GetObject(typeof(IUser), "tcp://localhost:9998/UserHandeling");
                    portal = (IPortal)Activator.GetObject(typeof(IPortal), "tcp://localhost:9998/PortalHandeling");
                    ftserver = (IFTserver)Activator.GetObject(typeof(IFTserver), "tcp://localhost:9998/TransferHandeling");
                }
                catch (RemotingException e)
                {
                    MessageBox.Show("Connection Error");
                }
            }
        }
开发者ID:Hourani,项目名称:GDS,代码行数:26,代码来源:Login.cs


示例11: PrintCommonReceipt

        public void PrintCommonReceipt(bool isVoidedTransaction, string Type, string Treasury, IUser autherizedUser)
        {
            CommonUtilities CommonUtilitiesObject = new CommonUtilities();
            CommonUtilitiesObject.currentUser = autherizedUser;
            try
            { 
                switch (Type.ToUpper())
                {
                    case "PROG":
                        Type = "Progressive";
                        break;
                    case "REFILL":
                        Type = "Refills";
                        break;
                    case "REFUND":
                        Type = "Refunds";
                        break;
                    default:
                        break;
                }
                BMC.Common.LogManagement.LogManager.WriteLog("Called PrintCommonReceipt type:treasury" + Type.ToString() + " : " + Treasury.ToString()
                , BMC.Common.LogManagement.LogManager.enumLogLevel.Debug);
                CommonUtilitiesObject.GetCommonValues(isVoidedTransaction, Type, Treasury);

            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

        }
开发者ID:sreenandini,项目名称:test_buildscripts,代码行数:31,代码来源:CashDeskOperator.cs


示例12: Save

        public IUser Save(IUser user)
        {
            using (MiniProfiler.Current.Step("UserRepository.Save"))
            {
                using (var dc = DataContextFactory.GetDataContext())
                {
                    User modelAsUser = null;
                    if (String.IsNullOrEmpty(user.UniqueKey))
                        modelAsUser = new User();
                    else
                        modelAsUser = dc.Repository<User>()
                            .Where(u => u.PkID == user.UniqueKey)
                            .FirstOrDefault();

                    if (modelAsUser == null)
                        throw new ArgumentException("Attempted to Update nonexisting User");

                    modelAsUser.Username = user.Username;
                    modelAsUser.LastName = user.LastName;
                    modelAsUser.FirstName = user.FirstName;
                    modelAsUser.Birthdate = user.Birthdate;

                    if (String.IsNullOrEmpty(modelAsUser.UniqueKey))
                        dc.Insert(modelAsUser);

                    dc.Commit();

                    return user;
                }
            }
        }
开发者ID:sgwill,项目名称:familyblog,代码行数:31,代码来源:UserRepository.cs


示例13: CreateOrUpdateOpenAuthUser

        private void CreateOrUpdateOpenAuthUser(IUser user) {
            var current = _httpContextAccessor.Current();
            if (current == null)
                return;

            var request = current.Request;

            if (request == null)
                return;

            var userName = request.QueryString["UserName"];
            var externalLoginData = request.QueryString["ExternalLoginData"];

            if (string.IsNullOrWhiteSpace(userName) ||
                string.IsNullOrWhiteSpace(externalLoginData))
                return;

            string providerName;
            string providerUserId;

            if (
                !_orchardOpenAuthWebSecurity.TryDeserializeProviderUserId(HttpUtility.UrlDecode(externalLoginData), out providerName,
                                                                          out providerUserId))
                return;

            _orchardOpenAuthWebSecurity.CreateOrUpdateAccount(providerName, providerUserId, user);
        }
开发者ID:li0803,项目名称:NGM.OpenAuthentication,代码行数:27,代码来源:OpenAuthUserEventHandler.cs


示例14: SerfidCore

 public SerfidCore(IListener listener, IFilter filter, IStorage storage, IUser user)
 {
     _listener = listener;
     _filter = filter;
     _storage = storage;
     _user = user;
 }
开发者ID:sonyas12,项目名称:GitHubVS2013,代码行数:7,代码来源:SerfidCore.cs


示例15: MessageInfo

 public MessageInfo(string text, IUser author, IEnumerable<ICategory> categories, DateTimeOffset created)
 {
     _authorId = author.Id;
     _categoryIds = categories.Select(f => f.Id).ToArray();
     _text = text;
     _created = created;
 }
开发者ID:Aleksask,项目名称:Altitude,代码行数:7,代码来源:MessageInfo.cs


示例16: GetAllGroupsForUser

        /// <summary>
        /// Gets all groups for a given user
        /// </summary>
        /// <param name="azureClient">An authenticated ActiveDirectoryClient</param>
        /// <param name="user">A resolved User object</param>
        private static void GetAllGroupsForUser(ActiveDirectoryClient azureClient, IUser user)
        {
            Console.WriteLine("");
            Console.WriteLine("Listing groups for " + user.DisplayName);
            IUserFetcher retrievedUserFetcher = (User)user;

            //access through the MemberOf collection
            IPagedCollection<IDirectoryObject> pagedCollection = retrievedUserFetcher.MemberOf.ExecuteAsync().Result; 
            do 
            { 
                List<IDirectoryObject> directoryObjects = pagedCollection.CurrentPage.ToList(); 

                foreach (IDirectoryObject directoryObject in directoryObjects) 
                { 
                    if (directoryObject is Group) 
                    { 
                        Group group = directoryObject as Group; 
                        Console.WriteLine(" Group: {0}", group.DisplayName); 
                        //add to parent collection if you need to extract them
                    } 

                    //removed to simplify 
                    //if (directoryObject is DirectoryRole) 
                    //{ 
                    //    DirectoryRole role = directoryObject as DirectoryRole; 
                    //    Console.WriteLine(" Role: {0}  Description: {1}", role.DisplayName, role.Description); 
                    //} 
                } 
                pagedCollection = pagedCollection.GetNextPageAsync().Result; 

            } while (pagedCollection != null && pagedCollection.MorePagesAvailable); 

        }
开发者ID:tandis,项目名称:PnP,代码行数:38,代码来源:Program.cs


示例17: Matcher

        public Matcher(IUser firstUser, IUser secondUser)
        {
            _secondUser = secondUser;
            _firstUser = firstUser;

            PeformMatch();
        }
开发者ID:mikaelharsjo,项目名称:Yoyyin,代码行数:7,代码来源:Matcher.cs


示例18: DateTime

		public static void AssertThatUserIsRolfGöranBengtsson( IUser user )
		{
			Assert.That( user.FirstName, Is.EqualTo( "Rolf-Göran" ) );
			Assert.That( user.LastName, Is.EqualTo( "Bengtsson" ) );
			Assert.That( user.EmailAddress, Is.EqualTo( "[email protected]" ) );
			Assert.That( user.BirthDate, Is.EqualTo( new DateTime( 1948, 5, 1 ) ) );
		}
开发者ID:bmbsqd,项目名称:Bombsquad.DataProxy,代码行数:7,代码来源:TestHelpers.cs


示例19: CreateSession

 public ISession CreateSession(IUser user)
 {
     return new RavenDbSession
                {
                    User = user
                };
 }
开发者ID:MrAntix,项目名称:Poci,代码行数:7,代码来源:RavenDbSessionDataService.cs


示例20: AssertThatUserIsCarlPhilipBernadotte

		public static void AssertThatUserIsCarlPhilipBernadotte( IUser user )
		{
			Assert.That( user.FirstName, Is.EqualTo( "Carl-Philip" ) );
			Assert.That( user.LastName, Is.EqualTo( "Bernadotte" ) );
			Assert.That( user.EmailAddress, Is.EqualTo( "[email protected]" ) );
			Assert.That( user.BirthDate.HasValue, Is.EqualTo( false ) );
		}
开发者ID:bmbsqd,项目名称:Bombsquad.DataProxy,代码行数:7,代码来源:TestHelpers.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IUserAccountService类代码示例发布时间:2022-05-24
下一篇:
C# IUrlRegistry类代码示例发布时间: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