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


C# System.Util类代码示例

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


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

示例1: Add

 /// <summary>
 /// This adds a LinkedList of objects
 /// </summary>
 /// <param name="actorList">The list of objects</param>
 public void Add(Util.LinkedList actorList)
 {
     foreach(DXMAN.Base.xRenderable obj in xObjects)
     {
         Add(obj);
     }
 }
开发者ID:andrewgbliss,项目名称:CS_DXMAN,代码行数:11,代码来源:xEventManager.cs

示例2: ValidOutcome

		/// <summary>
		/// This method determines whether the outcome is valid for the preceding sequence.  
		/// This can be used to implement constraints on what sequences are valid.  
		/// </summary>
		/// <param name="outcome">
		/// The outcome.
		/// </param>
		/// <param name="sequence">
		/// The preceding sequence of outcome assignments. 
		/// </param>
		/// <returns>
		/// true if the outcome is valid for the sequence, false otherwise.
		/// </returns>
		protected internal override bool ValidOutcome(string outcome, Util.Sequence sequence)
		{
			if (outcome.StartsWith("I-"))
			{
				string[] tags = sequence.Outcomes.ToArray();
				int lastTagIndex = tags.Length - 1;
				if (lastTagIndex == - 1)
				{
					return (false);
				}
				else
				{
					string lastTag = tags[lastTagIndex];
					if (lastTag == "O")
					{
						return false;
					}
					if (lastTag.Substring(2) != outcome.Substring(2))
					{
						return false;
					}
				}
			}
			return true;
		}
开发者ID:gblosser,项目名称:OpenNlp,代码行数:38,代码来源:EnglishTreebankChunker.cs

示例3: FileSystemRepository

 public FileSystemRepository(ILogger logger, ISettings settings, IEncryption encryption, Util.Util util)
 {
     _logger = logger;
     _settings = settings;
     _encryption = encryption;
     _util = util;
 }
开发者ID:ryanpagel,项目名称:OrderEntry,代码行数:7,代码来源:FileSystemRepository.cs

示例4: DHSha

			public DHSha(HashAlgorithm algorithm, Util.Func<Protocol, string> getName) {
				if (algorithm == null) throw new ArgumentNullException("algorithm");
				if (getName == null) throw new ArgumentNullException("getName");

				GetName = getName;
				Algorithm = algorithm;
			}
开发者ID:Belxjander,项目名称:Asuna,代码行数:7,代码来源:DiffieHellmanUtil.cs

示例5: getGraph

        public System.Windows.Controls.Image getGraph(Util.TimeType duration)
        {
            if (currentSearch == null)
                return null;
            try
            {
                string query = currentSearch + CHART_TIME;
                query += timeFilter[duration];

                Uri url = new Uri(CHART_BASE + query);
                //Debugging
                //Console.Write(CHART_BASE + query);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

                //See the response that yahoo creates
                WebResponse response = request.GetResponse();

                Stream sr = response.GetResponseStream();
                System.Drawing.Image chart = System.Drawing.Image.FromStream(sr);

                //Debugging
                //chart.Save("h:\\chartTest" + query + ".bmp");

                sr.Close();
                return convertDrawingImgToWindowImg(chart);

            }
            catch (Exception)
            {
                MessageBox.Show("Error downloading the graph.");
                return null;
            }
        }
开发者ID:akearney,项目名称:Econ-Project,代码行数:33,代码来源:WebInteractor.cs

示例6: Search

        public List<INVITATION> Search(INVITATION Entity, int PageSize, int PageIndex, out int TotalRecords, string OrderExp, Util.SortDirection SortDirection)
        {
            var result = Context.INVITATION.AsQueryable();
            if (Entity != null)
            {
                if (Entity.ID != 0)
                {
                    result = result.Where(b => b.ID == Entity.ID);
                }

                if (Entity.CustomerID.HasValue)
                {
                    result = result.Where(i => i.CustomerID == Entity.CustomerID);
                }

                if (!String.IsNullOrEmpty(Entity.InvitedMail))
                {
                    result = result.Where(i => i.InvitedMail.Contains(Entity.InvitedMail));
                }

                if (Entity.RegistrationDate != null)
                {
                    result = result.Where(i => i.RegistrationDate == (Entity.RegistrationDate));
                }
            }
            TotalRecords = result.Count();

            GenericSorterCaller<INVITATION> sorter = new GenericSorterCaller<INVITATION>();
            result = sorter.Sort(result, string.IsNullOrEmpty(OrderExp) ? DEFAULT_ORDER_EXP : OrderExp, SortDirection);

            // pagination
            return result.Skip(PageIndex * PageSize).Take(PageSize).ToList();
        }
开发者ID:gertgjoka,项目名称:fashion-commerce,代码行数:33,代码来源:InvitationDAO.cs

示例7: SyncServerMessage

        public int SyncServerMessage(Util.DBHelper db)
        {
            var shutdownDoc = db.GetDocument("Server", "Shutdown");
            if (shutdownDoc == null)
            {
                shutdownDoc = db.CreateDocument("Server", "Shutdown",
                    new BsonDocument()
                    {
                        { "Flag", false },
                        { "Message", "" }
                    });
            }
            else
            {
                var flag = shutdownDoc["Flag"].AsBoolean;
                var msg = shutdownDoc["Message"].AsString;

                this.ShutdownFlag = flag;
                this.ShutdownMessage = msg;


                // 메세지가 있고 이전 메세지와 다르면 이벤트 발생
                if (msg.Length > 0 && m_prevShutMsg != msg && this.WhenShutdownMessageChanged != null)
                    this.WhenShutdownMessageChanged(msg, flag);


                m_prevShutMsg = msg;
            }


            return 0;
        }
开发者ID:NeuroWhAI,项目名称:ClickWar,代码行数:32,代码来源:GameMap.cs

示例8: World

 public World(Dictionary<String, Block> bl, String n)
 {
     this.name = n;
        this.blocks = bl;
        this.util = new Util();
        this.xLength = (int)(Game1.graphics.GraphicsDevice.Viewport.Bounds.Width / 32);
        this.yLength = (int)(Game1.graphics.GraphicsDevice.Viewport.Bounds.Height / 32);
 }
开发者ID:patrickfreed,项目名称:SideCraft--Old-,代码行数:8,代码来源:World.cs

示例9: MapDataHeight

        public MapDataHeight(Util.Map.Location map)
        {
            this.map = map;
            this.file = WorldConfig.FILE_HEIGHT;

            byte[] bytes = Load();
            if (bytes!=null) Parse(bytes);
        }
开发者ID:cyanpunk,项目名称:muonline,代码行数:8,代码来源:MapDataHeight.cs

示例10: Button

 public Button(string text, Util.Rect rect, Font font, VisualRectangle vsSelected, VisualRectangle vsUnselected)
 {
     this.font = font;
     this.vsSelected = vsSelected;
     this.vsUnselected = vsUnselected;
     this.rect = rect;
     this.text = text;
 }
开发者ID:lightofanima,项目名称:Polys,代码行数:8,代码来源:Button.cs

示例11: UserControl_Loaded

 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     util = new Util();
     DatabaseConnection dbc = new DatabaseConnection();
     c = dbc.getConnection();
     cmd = c.CreateCommand();
     updatePane();
 }
开发者ID:sijojose210,项目名称:movie-manager-.net,代码行数:8,代码来源:Watched.xaml.cs

示例12: Mention

 public Mention(Util.Span span, Util.Span headSpan, int entityId, IParse parse, string extentType)
 {
     mSpan = span;
     mHeadSpan = headSpan;
     mId = entityId;
     mType = extentType;
     mParse = parse;
 }
开发者ID:ronnyMakhuddin,项目名称:SharperNLP,代码行数:8,代码来源:Mention.cs

示例13: MapTypeInfo

 public MapTypeInfo(Type type, Util.AttributeExtCollection attributes, bool isFwdDeclPossible) {
     if ((type == null) || (attributes == null)) {
         throw new ArgumentException("type and attributes must be != null");
     }
     m_type = type;
     m_attributes = attributes;            
     m_isFwdDeclPossible = isFwdDeclPossible;
 }
开发者ID:JnS-Software-LLC,项目名称:iiop-net,代码行数:8,代码来源:MapTypeInfo.cs

示例14: Process

 public override void Process(Util.Commands.CmdTrigger<ToolCmdArgs> trigger)
 {
     using (var wowFile = new WoWFile(trigger.Text.NextWord()))
     {
         GameObjectTypeExtractor.Extract(wowFile);
     }
     //base.Process(trigger);
 }
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:GODumpCommand.cs

示例15: GetEffect

 protected override Effect GetEffect(Util.FastBitmap source)
 {
     return new ColorTintEffect
     {
         Amount = Amount/100.0,
         RequiredColor = Color
     };
 }
开发者ID:dbre2,项目名称:dynamic-image,代码行数:8,代码来源:ColorTintFilter.cs


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