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

C# EntryType类代码示例

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

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



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


示例16: MemberValue

        private MemberValue(Component component, EntryType entryType,
      MemberInfo info, bool inherited)
        {
            this.component = component;
              this.entryType = entryType;
              this.info = info;

              Dummy = GetValue();
              IsInherited = inherited;
        }
开发者ID:buckle2000,项目名称:besiege-modloader,代码行数:10,代码来源:MemberValue.cs


示例17: GetEntry

        private Entry GetEntry(DateTime date, decimal amount, Account account, EntryType entryType = EntryType.Debit)
        {
            var transaction = new IncomeTransaction { Date = date };
            var entry = new Entry { Amount = amount, Account = account, Transaction = transaction, Type = entryType };
            transaction.Entries.Add(entry);

            Repository.Save(transaction);

            return entry;
        }
开发者ID:spcboog,项目名称:budgomatic,代码行数:10,代码来源:GetAccountBalanceForDateCommandFixture.cs


示例18: GetHerIconByType

 public static String GetHerIconByType(EntryType type)
 {
     if (type == EntryType.SinaWeibo)
         return GetHerSinaWeiboIconUrl();
     else if (type == EntryType.Renren)
         return GetHerRenrenIconUrl();
     else if (type == EntryType.Douban)
         return GetHerDoubanIconUrl();
     return "";
 }
开发者ID:thankcreate,项目名称:CareWin8,代码行数:10,代码来源:MiscTool.cs


示例19: ImageLine

 public ImageLine(string n, string fp, string d, string cat = "", string code = "",
     EntryType typ = EntryType.Nope)
 {
     Name = n;
     FilePath = fp;
     Category = cat;
     Description = d;
     CustomCode = code;
     EntryType = typ;
     SizeB = new FileInfo(fp).Length;
 }
开发者ID:zdimension,项目名称:SharpBoot,代码行数:11,代码来源:ImageLine.cs


示例20: MenuEntry

 /// <summary>
 /// Constructs a new menu entry with the specified text.
 /// </summary>
 public MenuEntry(GameScreen owningScreen, string text, EntryType type, GameScreen linkScreen)
 {
     _text = text;
     _owningScreen = owningScreen;
     _linkScreen = linkScreen;
     _type = type;
     _scale = 0.9f;
     _alpha = 1.0f;
     _settingsChange = null;
     _optionRequiresRestart = false;
 }
开发者ID:kevroy314,项目名称:XNA-Farseer-Prototype,代码行数:14,代码来源:MenuEntry.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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