本文整理汇总了C#中EntryType类的典型用法代码示例。如果您正苦于以下问题:C# EntryType类的具体用法?C# EntryType怎么用?C# EntryType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntryType类属于命名空间,在下文中一共展示了EntryType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUrlElement
private XElement CreateUrlElement(EntryType entryType, object id) {
return new XElement(XName.Get("url", ns_sitemap),
new XElement(XName.Get("loc", ns_sitemap), GenerateEntryUrl(entryType, id))
);
}
示例2: GetSum
private decimal GetSum(ISession session, Guid accountId, DateTime date, EntryType entryType)
{
// TODO : try to get the lamda version working
// currently gives this error: "could not resolve property" regarding Transaction.Date
//return session.QueryOver<Entry>().Where(x =>
// (x.Account.Id == accountId) &&
// (x.Transaction.Date <= date) &&
// (x.Type == entryType))
// .List()
// .Sum(x => x.Amount);
var entries = session.CreateCriteria<Entry>()
.Add(Expression.Eq("Type", entryType))
.Add(Expression.Eq("Account.Id", accountId))
.CreateCriteria("Transaction")
.Add(Expression.Eq("Deleted", false))
.Add(Expression.Le("Date", date))
.List();
decimal sum = 0;
foreach (Entry entry in entries)
{
sum += entry.Amount;
}
return sum;
}
示例3: LogEntry
/// <summary>
/// Writes an Entry in the Log.
/// </summary>
/// <param name="message">The Message.</param>
/// <param name="type">The Type of the Entry.</param>
/// <param name="user">The User that generated the Entry.</param>
public static void LogEntry(string message, EntryType type, string user)
{
try {
Settings.Provider.LogEntry(message, type, user);
}
catch { }
}
示例4: EntryTypeToString
public static string EntryTypeToString(EntryType tp)
{
switch (tp)
{
case EntryType.Nickname:
return "nickname";
case EntryType.ScreenName:
return "screen_name";
case EntryType.Sex:
return "sex";
case EntryType.City:
return "city";
case EntryType.Country:
return "country";
case EntryType.Timezone:
return "timezone";
case EntryType.Photo:
return "photo";
case EntryType.PhotoMedium:
return "photo_medium";
case EntryType.HasMobile:
return "has_mobile";
case EntryType.Rate:
return "rate";
case EntryType.Contacts:
return "contacts";
case EntryType.Education:
return "education";
case EntryType.Online:
return "online";
default:
return String.Format("{0}", tp);
}
}
示例5: Index
public ActionResult Index(string filter, EntryType searchType = EntryType.Undefined, bool allowRedirect = true,
string tag = null,
string sort = null,
int? artistId = null,
ArtistType? artistType = null,
DiscType? discType = null,
SongType? songType = null,
bool? onlyWithPVs = null
)
{
filter = !string.IsNullOrEmpty(filter) ? filter.Trim() : string.Empty;
if (allowRedirect && !string.IsNullOrEmpty(filter)) {
var redirectResult = TryRedirect(filter, searchType);
if (redirectResult != null)
return redirectResult;
}
ViewBag.Query = filter;
ViewBag.SearchType = searchType != EntryType.Undefined ? searchType.ToString() : "Anything";
ViewBag.Tag = tag;
ViewBag.Sort = sort;
ViewBag.ArtistId = artistId;
ViewBag.ArtistType = artistType;
ViewBag.DiscType = discType;
ViewBag.SongType = songType;
ViewBag.OnlyWithPVs = onlyWithPVs;
SetSearchEntryType(searchType);
return View();
}
示例6: populateFromResultTable
private void populateFromResultTable(Hashtable table)
{
this.id = Convert.ToInt16(table["id"]);
this.entrytype = (EntryType)Convert.ToInt16(table["type"]);
this.datetime = DateTime.Parse(table["datetime"].ToString());
this.debit = table["debit"].ToString().Equals("") ? 0.00 : Convert.ToDouble(table["debit"]);
this.credit = table["credit"].ToString().Equals("") ? 0.00 : Convert.ToDouble(table["credit"]);
}
示例7: EntryForPictureDisplayContract
public EntryForPictureDisplayContract(EntryType entryType, int entryId, string name, int version, PictureContract pictureContract)
{
EntryType = entryType;
EntryId = entryId;
Name = name;
Version = version;
Picture = pictureContract;
}
示例8: GlobalSearchBoxModel
public GlobalSearchBoxModel(EntryType? objectType, string searchTerm)
{
AllObjectTypes = new TranslateableEnum<EntryType>(() => global::Resources.EntryTypeNames.ResourceManager, new[] {
EntryType.Undefined, EntryType.Artist, EntryType.Album, EntryType.Song, EntryType.Tag, EntryType.User
});
ObjectType = objectType ?? EntryType.Artist;
GlobalSearchTerm = searchTerm ?? string.Empty;
}
示例9: MenuEntry
public MenuEntry(MenuScreen nMenu, EntryType nType, string nText, List<object> nValues, int nDefaultIndex, OptionEntrySelected nCallback)
{
mName = nText;
mType = nType;
mMenu = nMenu;
mValues = nValues;
mCallback = nCallback;
mSelectedIndex = nDefaultIndex;
}
示例10: MenuEntry
/// <summary>
/// Constructs a new menu entry with the specified text.
/// </summary>
public MenuEntry(MenuScreen menu, string text, EntryType type, GameScreen screen)
{
_text = text;
_screen = screen;
_type = type;
_menu = menu;
_scale = 0.9f;
_alpha = 1.0f;
}
示例11: AssertHasEntry
private EntryForApiContract AssertHasEntry(PartialFindResult<EntryForApiContract> result, string name, EntryType entryType) {
var entry = result.Items.FirstOrDefault(a => string.Equals(a.DefaultName, name, StringComparison.InvariantCultureIgnoreCase)
&& a.EntryType == entryType);
Assert.IsNotNull(entry, "Entry found");
return entry;
}
示例12: BootMenuItem
public BootMenuItem(string n, string d, EntryType t, string ison = "", bool st = true, string code = "")
{
Name = n;
Description = d;
Type = t;
Start = st;
IsoName = Path.GetFileName(ison);
CustomCode = code;
}
示例13: LogOutputAspectBase
// ReSharper restore InconsistentNaming
/// <summary>
/// Initializes log output base class
/// </summary>
/// <param name="typeOfEntriesToOutput">Desired combination of EntryType to filter items to be collected for outputting.</param>
/// <param name="writeAllEntriesIfKeyFound">
/// If true and optionalKey is specified, the entire log collection is written if key is found in the collection.
/// If false and optionalKey is specified, only log items with the key will be written.
/// </param>
/// <param name="optionalKey">
/// Optional item keys to output or to decide whether log collection needs to be written to
/// output. All items are written if not specified.
/// </param>
protected LogOutputAspectBase(EntryType typeOfEntriesToOutput, bool writeAllEntriesIfKeyFound, IEnumerable<string> optionalKey)
{
this.keys = optionalKey == null ? new string[0] : optionalKey.Where(key => !key.IsBlank()).ToArray();
if(writeAllEntriesIfKeyFound && keys.Length == 0)
throw new ArgumentNullException("optionalKey parameter value must be specified when writeAllEntriesIfKeyFound = true.");
this.entryTypeFilter = typeOfEntriesToOutput;
this.writeAllEntriesIfKeyFound = writeAllEntriesIfKeyFound;
}
示例14: MenuEntry
/// <summary>
/// Constructs a new menu entry with the specified text.
/// </summary>
public MenuEntry( MenuScreen menu, string text, EntryType type, GameScreen screen, Texture2D preview )
{
_text = text;
_screen = screen;
_type = type;
_menu = menu;
_scale = 0.9f;
_alpha = 1.0f;
Preview = preview;
}
示例15: DirectoryEntry
public DirectoryEntry(string name, string fullname, string ext, string size, DateTime date, string imagepath, EntryType type)
{
_name = name;
_fullpath = fullname;
_ext = ext;
_size = size;
_date = date;
_imagepath = imagepath;
_type = type;
}