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

C# AbsoluteTopicName类代码示例

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

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



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


示例16: Add

		/// <summary>
		/// Adds an instance of type AbsoluteTopicName to the end of this AbsoluteTopicNameCollection.
		/// </summary>
		/// <param name="value">
		/// The AbsoluteTopicName to be added to the end of this AbsoluteTopicNameCollection.
		/// </param>
		public virtual void Add(AbsoluteTopicName value)
		{
			this.List.Add(value);
		}
开发者ID:nuxleus,项目名称:flexwiki,代码行数:10,代码来源:AbsoluteTopicNameCollection.cs


示例17: ComparePropertyUpdatesForVerb

 static void ComparePropertyUpdatesForVerb(AbsoluteTopicName t, IList expectedProperties, IList gotProperties, string verb)
 {
     foreach (string propertyName in expectedProperties)
     {
         bool found = gotProperties.Contains(propertyName);
         if (!found)
             System.Diagnostics.Debug.WriteLine("ACK!");
         Assert.IsTrue(found, "Missing " + verb + " property (" + propertyName + " in " + t.FullnameWithVersion + ") from fired event(s)");
         gotProperties.Remove(propertyName);
     }
     if (gotProperties.Count == 0)
         return;	// good -- there should be none left
     string s = "";
     foreach (string p in gotProperties)
     {
         if (s != "")
             s += ", ";
         s += p;
     }
     Assert.Fail("Unexpected " + verb + " property notifications for: " + s);
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:21,代码来源:ContentBaseTest.cs


示例18: TestTopicUpdateWhenAuthorChanges

        public void TestTopicUpdateWhenAuthorChanges()
        {
            AbsoluteTopicName tn = new AbsoluteTopicName("AuthorEventTest", _base.Namespace);

            FederationUpdate expected = new FederationUpdate();
            expected.RecordPropertyChange(tn, "_LastModifiedBy", FederationUpdate.PropertyChangeType.PropertyUpdate);
            expected.RecordPropertyChange(tn, "_Body", FederationUpdate.PropertyChangeType.PropertyUpdate);
            expected.RecordPropertyChange(tn, "_ModificationTime", FederationUpdate.PropertyChangeType.PropertyUpdate);

            WriteTestTopicAndNewVersion(_base, tn.Name, "this is the original text", "pre modern man");

            StartMonitoringEvents(_base);
            AbsoluteTopicName versioned = WriteTestTopicAndNewVersion(_base, tn.Name, "this is a change", "post modern man");
            StopMonitoringEvents(_base);

            expected.RecordPropertyChange(versioned, "_LastModifiedBy", FederationUpdate.PropertyChangeType.PropertyAdd);
            expected.RecordPropertyChange(versioned, "_Body", FederationUpdate.PropertyChangeType.PropertyAdd);
            expected.RecordPropertyChange(versioned, "_ModificationTime", FederationUpdate.PropertyChangeType.PropertyAdd);
            expected.RecordPropertyChange(versioned, "_TopicName", FederationUpdate.PropertyChangeType.PropertyAdd);
            expected.RecordPropertyChange(versioned, "_TopicFullName", FederationUpdate.PropertyChangeType.PropertyAdd);
            expected.RecordPropertyChange(versioned, "_CreationTime", FederationUpdate.PropertyChangeType.PropertyAdd);

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


示例19: BeginGetHtmlForTopicVersion

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


示例20: htmlEditor1_BeforeNavigate

        private void htmlEditor1_BeforeNavigate(object s, onlyconnect.BeforeNavigateEventArgs e)
        {
            Console.WriteLine(e.NewTarget);

            string[] splitUrl = e.Target.Split('/');
            string fullName = splitUrl[splitUrl.Length-1];
            string[] split = fullName.Split('.');

            if (split.Length == 2)
            {
                AbsoluteTopicName currentTopicName = new AbsoluteTopicName();
                currentTopicName.Fullname = fullName;

                currentTopicName.Namespace = split[0];
                currentTopicName.Name = split[1];

                if (currentTopicName.Namespace == currentContentBase.Namespace)
                {
                    foreach (ListViewItem lvi in listViewTopicNames.Items)
                    {
                        AbsoluteTopicName topicName = (AbsoluteTopicName)lvi.Tag;
                        if (currentTopicName.Name  == topicName.Name)
                        {
                            lvi.Selected = true;
                            e.Cancel = true;
                            break;
                        }
                    }
                }
                else
                {
                    foreach(ContentBase cb in contentBases)
                    {
                        if (cb.Namespace == currentTopicName.Namespace )
                        {
                            comboBoxContentBase.SelectedValue = currentTopicName.Namespace;

                            foreach (ListViewItem lvi in listViewTopicNames.Items)
                            {
                                AbsoluteTopicName topicName = (AbsoluteTopicName)lvi.Tag;
                                if (currentTopicName.Name  == topicName.Name)
                                {
                                    lvi.Selected = true;
                                    e.Cancel = true;
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:52,代码来源:MainForm.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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