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


C# IUser类代码示例

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


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


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