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


C# AbsoluteTopicName类代码示例

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


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

示例1: GetCacheRuleForTopic

 private CacheRule GetCacheRuleForTopic(string topic)
 {
     AbsoluteTopicName tn = new AbsoluteTopicName(topic);
     CompositeCacheRule rule = new CompositeCacheRule();
     Formatter.FormattedTopic(tn, OutputFormat.Testing, null, Federation, _lm, rule);
     return rule;
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:7,代码来源:CachingTests.cs

示例2: AbsoluteTopicName

		string IEditServiceProxy.GetTextForTopic(LocalTopic topic)
		{
			AbsoluteTopicName atn = new AbsoluteTopicName(); 
			atn.Namespace = topic.Namespace.Name; 
			atn.Name = topic.Name; 
			return base.GetTextForTopic(atn); 
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:7,代码来源:FwEditServiceProxy.cs

示例3: TestFederationPropagationOfContentBaseFederationUpdates

		[Test] public void TestFederationPropagationOfContentBaseFederationUpdates()
		{
			AbsoluteTopicName tn = new AbsoluteTopicName("EventTest", _base.Namespace);
			_base.WriteTopic(tn.LocalName, @"Stay1: hello
Stay2: foo
Go1: foo
Go2: foo
Change1: blag
Change2: blag
");

			FederationUpdate expected = new FederationUpdate();
			expected.RecordPropertyChange(tn, "_ModificationTime", FederationUpdate.PropertyChangeType.PropertyUpdate);
			expected.RecordPropertyChange(tn, "_Body", FederationUpdate.PropertyChangeType.PropertyUpdate);
			expected.RecordPropertyChange(tn, "Go1", FederationUpdate.PropertyChangeType.PropertyRemove);
			expected.RecordPropertyChange(tn, "Go2", FederationUpdate.PropertyChangeType.PropertyRemove);
			expected.RecordPropertyChange(tn, "Change1", FederationUpdate.PropertyChangeType.PropertyUpdate);
			expected.RecordPropertyChange(tn, "Change2", FederationUpdate.PropertyChangeType.PropertyUpdate);
			
			StartMonitoringFederationEvents();
			_base.WriteTopic(tn.LocalName, @"Stay1: hello
Stay2: foo
Change1: new value
Change2: new value
");
			StopMonitoringFederationEvents();
			ContentBaseTests.CompareFederationUpdates(expected, _Events, false, true);
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:28,代码来源:FederationTests.cs

示例4: AddRange

		/// <summary>
		/// Adds the elements of an array to the end of this AbsoluteTopicNameCollection.
		/// </summary>
		/// <param name="items">
		/// The array whose elements are to be added to the end of this AbsoluteTopicNameCollection.
		/// </param>
		public virtual void AddRange(AbsoluteTopicName[] items)
		{
			foreach (AbsoluteTopicName item in items)
			{
				this.List.Add(item);
			}
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:13,代码来源:AbsoluteTopicNameCollection.cs

示例5: DoPage

		protected void DoPage()
		{
			LinkMaker lm = TheLinkMaker;

			string body = Request.Form["body"];
			string ns = Request.Form["defaultNamespace"];
			string tn = Request.Form["topic"];

			AbsoluteTopicName topicName = new AbsoluteTopicName(tn, ns);

			Response.Write("<div class='PreviewMain'>");
			Response.Write(Formatter.FormattedString(topicName, body, OutputFormat.HTML, TheFederation.ContentBaseForNamespace(ns), TheLinkMaker, null));
			Response.Write("</div>");
			Response.Write(@"<div id='TopicTip' class='TopicTip' ></div>");
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:15,代码来源:Preview.aspx.cs

示例6: GetAllTopics

		public AbsoluteTopicName[] GetAllTopics(ContentBase cb)
		{
			Hashtable ns = (Hashtable) namespaces[cb.Namespace]; 
		
			ArrayList atns = new ArrayList(); 

			foreach (string topic in ns.Keys)
			{
				AbsoluteTopicName atn = new AbsoluteTopicName(); 
				atn.Namespace = cb.Namespace; 
				atn.Name = topic; 
				atn.Version = GetLatestVersion((Hashtable) ns[topic]); 
				atns.Add(atn); 
			}

			return (AbsoluteTopicName[]) atns.ToArray(typeof(AbsoluteTopicName)); 
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:17,代码来源:MockEditServiceProxy.cs

示例7: ShowPage

		protected void ShowPage()
		{
			string topicString = Request.QueryString["topic"];
			AbsoluteTopicName topic = new AbsoluteTopicName(topicString);
			Response.Write("<h1>All Versions for " + topic.Fullname + "</h1>");
			
			IEnumerable changeList = TheFederation.GetTopicChanges(topic);

			// Now generate the page!

			bool first = true;
			string mostRecentVersion = null;
			foreach (TopicChange change in changeList)
			{
				if (first)
					mostRecentVersion = change.Version;
				string s = "";
				if (change.Version == topic.Version || (first &&  topic.Version == null))
				{
					s += "&rarr;&nbsp;";
				}
				else
					s += "&nbsp;&nbsp;&nbsp;&nbsp;";
				if (change.Timestamp.Date == DateTime.Now.Date)
					s += change.Timestamp.ToString("HH:mm");
				else
				{
					if (change.Timestamp.Date.Year == DateTime.Now.Date.Year)
						s += change.Timestamp.ToString("MMM d  H:mm");
					else
						s += change.Timestamp.ToString("MMM d yyyy  H:mm");
				}	
				s += "&nbsp;&nbsp;(" + change.Author + ")";	
				AbsoluteTopicName linkTo = change.Topic;
				if (first)
					linkTo.Version = null;	// don't include the version for the latest one
				Response.Write("<li><a href='" + TheLinkMaker.LinkToTopic(linkTo)  + "'>" + s + "</a>");
				first = false;
			}

		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:41,代码来源:Versions.aspx.cs

示例8: AbsoluteTopicNameCollection

		/// <summary>
		/// Initializes a new instance of the AbsoluteTopicNameCollection class, containing elements
		/// copied from an array.
		/// </summary>
		/// <param name="items">
		/// The array whose elements are to be added to the new AbsoluteTopicNameCollection.
		/// </param>
		public AbsoluteTopicNameCollection(AbsoluteTopicName[] items)
		{
			this.AddRange(items);
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:11,代码来源:AbsoluteTopicNameCollection.cs

示例9: GetVersionsForTopic

        private void GetVersionsForTopic(AbsoluteTopicName topicName)
        {
            flatComboBoxVersion.Items.Clear();
            buttonItemRestore.Enabled = false;

            string[] versions = editService.GetVersionsForTopic(topicName);

            if (versions.Length > 0)
            {
                foreach (string s in versions)
                {
                    flatComboBoxVersion.Items.Add(s);
                }

                flatComboBoxVersion.SelectedIndex = 0;
            }
        }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:17,代码来源:MainForm.cs

示例10: RestoreTopic

 public void RestoreTopic(AbsoluteTopicName topicName, string visitorIdentityString, string version)
 {
     this.Invoke("RestoreTopic", new object[] {
                                          topicName,
                                          visitorIdentityString,
                                          version});
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:7,代码来源:EditServiceProxy.cs

示例11: TestTopicUpdateEvent

        public void TestTopicUpdateEvent()
        {
            AbsoluteTopicName tn = new AbsoluteTopicName("EventTest", _base.Namespace);

            FederationUpdate expected = new FederationUpdate();
            expected.RecordUpdatedTopic(tn);

            _base.WriteTopic(tn.LocalName, "hello");

            StartMonitoringEvents(_base);
            _base.WriteTopic(tn.LocalName, "second should be an update");
            StopMonitoringEvents(_base);

            CompareFederationUpdates(expected, _Events, true, false);
        }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:15,代码来源:ContentBaseTest.cs

示例12: GetHtmlForTopicVersion

 public string GetHtmlForTopicVersion(AbsoluteTopicName topicName, string version)
 {
     object[] results = this.Invoke("GetHtmlForTopicVersion", new object[] {
                                                                       topicName,
                                                                       version});
       return ((string)(results[0]));
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:7,代码来源:EditServiceProxy.cs

示例13: GetTextForTopic

 public string GetTextForTopic(AbsoluteTopicName topicName)
 {
     object[] results = this.Invoke("GetTextForTopic", new object[] {
                                                                topicName});
       return ((string)(results[0]));
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:6,代码来源:EditServiceProxy.cs

示例14: BeginRestoreTopic

 /// <remarks/>
 public System.IAsyncResult BeginRestoreTopic(AbsoluteTopicName topicName, string visitorIdentityString, string version, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("RestoreTopic", new object[] {
                                                      topicName,
                                                      visitorIdentityString,
                                                      version}, callback, asyncState);
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:8,代码来源:EditServiceProxy.cs

示例15: BeginGetPreviewForTopic

 /// <remarks/>
 public System.IAsyncResult BeginGetPreviewForTopic(AbsoluteTopicName topicName, string textToFormat, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetPreviewForTopic", new object[] {
                                                            topicName,
                                                            textToFormat}, callback, asyncState);
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:7,代码来源:EditServiceProxy.cs


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