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


C# EntryType类代码示例

本文整理汇总了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))
			);

		}
开发者ID:realzhaorong,项目名称:vocadb,代码行数:7,代码来源:SitemapGenerator.cs

示例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;
        }
开发者ID:spcboog,项目名称:budgomatic,代码行数:27,代码来源:GetAccountBalanceForDateCommand.cs

示例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 { }
 }
开发者ID:mono,项目名称:ScrewTurnWiki,代码行数:13,代码来源:Log.cs

示例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);
     }
 }
开发者ID:sinland,项目名称:vkshopmanager,代码行数:34,代码来源:VkProfile.cs

示例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();
        }
开发者ID:realzhaorong,项目名称:vocadb,代码行数:34,代码来源:SearchController.cs

示例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"]);
 }
开发者ID:Trexis,项目名称:financemanager,代码行数:8,代码来源:statemententry.cs

示例7: EntryForPictureDisplayContract

 public EntryForPictureDisplayContract(EntryType entryType, int entryId, string name, int version, PictureContract pictureContract)
 {
     EntryType = entryType;
     EntryId = entryId;
     Name = name;
     Version = version;
     Picture = pictureContract;
 }
开发者ID:realzhaorong,项目名称:vocadb,代码行数:8,代码来源:EntryForPictureDisplayContract.cs

示例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;
 }
开发者ID:realzhaorong,项目名称:vocadb,代码行数:8,代码来源:SharedModels.cs

示例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;
 }
开发者ID:WilHall,项目名称:hakyn-client,代码行数:9,代码来源:MenuEntry.cs

示例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;
 }
开发者ID:wegorich,项目名称:XNA-Game-and-WPF-Map-Editor,代码行数:12,代码来源:MenuEntry.cs

示例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;

		}
开发者ID:realzhaorong,项目名称:vocadb,代码行数:9,代码来源:EntryQueriesTests.cs

示例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;
 }
开发者ID:zdimension,项目名称:SharpBoot,代码行数:9,代码来源:BootMenu.cs

示例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;
        }
开发者ID:vgribok,项目名称:Aspectacular,代码行数:23,代码来源:LogOutputAspectBase.cs

示例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;
 }
开发者ID:headdetect,项目名称:Circular,代码行数:13,代码来源:MenuEntry.cs

示例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;
 }
开发者ID:ssommerf,项目名称:Gateworld.Sharp,代码行数:10,代码来源:FileBrowserControl.xaml.cs


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