本文整理汇总了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);
}
示例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);
}
}
示例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;
}
示例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 ) );
}
示例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);
}
示例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 ) );
}
示例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";
}
示例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;
}
}
}
示例9: ConnectStorageStage
public ConnectStorageStage(IUser user, string ipaddress, int port)
{
// TODO: Complete member initialization
this._User = user;
this._IpAddress = ipaddress;
this._Port = port;
}
示例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");
}
}
}
示例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);
}
}
示例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;
}
}
}
示例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);
}
示例14: SerfidCore
public SerfidCore(IListener listener, IFilter filter, IStorage storage, IUser user)
{
_listener = listener;
_filter = filter;
_storage = storage;
_user = user;
}
示例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;
}