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


C# Microsoft.Add方法代码示例

本文整理汇总了C#中Microsoft.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Add方法的具体用法?C# Microsoft.Add怎么用?C# Microsoft.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft的用法示例。


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

示例1: AddTo

        internal bool AddTo(Microsoft.Web.Administration.BindingCollection collection)
        {
            string bindingInformation = "*:" + _port + ":" + _hostName;
              Microsoft.Web.Administration.Binding existingBinding = collection.SingleOrDefault(b => b.BindingInformation.Equals(bindingInformation, StringComparison.InvariantCultureIgnoreCase));
              bool changed = false;
              if (existingBinding != null)
              {
            if (existingBinding.Protocol != _protocol)
            {
              existingBinding.Protocol = _protocol;
              changed = true;
            }

            if (existingBinding.BindingInformation != bindingInformation)
            {
              existingBinding.BindingInformation = bindingInformation;
              changed = true;
            }
              }
              else
              {
            collection.Add(bindingInformation, _protocol);
            changed = true;
              }

              return changed;
        }
开发者ID:proNestorAps,项目名称:IisApplicationHostManager,代码行数:27,代码来源:Binding.cs

示例2: AddLBpaths

 public static void AddLBpaths(Microsoft.VisualBasic.Collection data)
 {
     ContentAPI apiCont = new ContentAPI();
     Ektron.Cms.Library.EkLibrary objLib;
     int lbICount;
     int lbFCount;
     Collection lb;
     Collection cLbs;
     lbICount = 0;
     lbFCount = 0;
     objLib = apiCont.EkLibraryRef;
     cLbs = objLib.GetAllLBPaths("images");
     if (cLbs.Count > 0)
     {
         foreach (Collection tempLoopVar_lb in cLbs)
         {
             lb = tempLoopVar_lb;
             lbICount++;
             data.Add(HttpContext.Current.Server.MapPath((string)(lb["LoadBalancePath"])), (string)("LoadBalanceImagePath_" + lbICount), null, null);
         }
     }
     data.Add(lbICount, "LoadBalanceImageCount", null, null);
     cLbs = null;
     lb = null;
     cLbs = objLib.GetAllLBPaths("files");
     if (cLbs.Count > 0)
     {
         foreach (Collection tempLoopVar_lb in cLbs)
         {
             lb = tempLoopVar_lb;
             lbFCount++;
             data.Add(HttpContext.Current.Server.MapPath((string)(lb["LoadBalancePath"])), (string)("LoadBalanceFilePath_" + lbFCount), null, null);
         }
     }
     data.Add(lbFCount, "LoadBalanceFileCount", null, null);
     cLbs = null;
 }
开发者ID:femiosinowo,项目名称:sssadl,代码行数:37,代码来源:Utilities.cs

示例3: InitTreeRootNode

 /// <summary>
 /// ��ʼ��TreeView �� RootNode
 /// </summary>
 private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
 {
     DataView dataView  = new DataView();
     dataView		   = dataTbl1.Copy().DefaultView;
     dataView.RowFilter = "ClassParentID = ClassID";
     foreach(DataRowView drv in dataView)
     {
         Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
         tn.ID		   = drv["ClassID"].ToString();
         tn.Text		   = drv["ClassName"].ToString();
         tn.ImageUrl    = GetIcon(drv["ClassType"].ToString(),_imagepath);
         //tn.NavigateUrl = "# onclick='alert('dddd')'";
         //tn.Target      = "self";
         TNC.Add(tn);
         InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
         InitTreeChildNode(tn.Nodes,tn.ID);
     }
     dataTbl1 = null;
     dataTbl2 = null;
 }
开发者ID:blfsir,项目名称:benzoa,代码行数:23,代码来源:ControlCustomProjectTreeView.ascx.cs

示例4: InitTreeChildNode

 /// <summary>
 /// ��ʼ��TreeView �� ChildNode
 /// </summary>
 private void InitTreeChildNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC, string classParentID)
 {
     DataView dataView  = new DataView();
     dataView		   = dataTbl2.Copy().DefaultView ;
     dataView.RowFilter = "ClassParentID = " + classParentID + "";
     foreach(DataRowView drv in dataView)
     {
         Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
         tn.ID		   = drv["ClassID"].ToString();
         tn.Text		   = drv["ClassName"].ToString();
         tn.ImageUrl    = GetIcon(drv["ClassType"].ToString(),_imagepath);
         //tn.NavigateUrl = "#";
         //tn.Target      = "parent";
         TNC.Add(tn);
         InitTreeChildNode(tn.Nodes,tn.ID);
     }
 }
开发者ID:blfsir,项目名称:benzoa,代码行数:20,代码来源:ControlCustomProjectTreeView.ascx.cs

示例5: FindFeatureClassByName

		private IFeatureClass FindFeatureClassByName(IWorkspace workspace, string name, Microsoft.VisualBasic.Collection colFCByName)
		{
			IFeatureClass esriFeatureClass = null;

			try
			{
				// try to retrieve FeatureClass in collection
				esriFeatureClass = (IFeatureClass)colFCByName[name];
				return esriFeatureClass;
			}
			catch { }

			IEnumDataset enumDatasets;
			IDataset esriDataset;
			IFeatureClassContainer featContainer;

			// get datasets
			enumDatasets = workspace.get_Datasets(esriDatasetType.esriDTFeatureDataset);
			enumDatasets.Reset();
			esriDataset = enumDatasets.Next();
			while (esriDataset != null)
			{
				// try to find class in dataset
				try
				{
					featContainer = (IFeatureClassContainer)esriDataset;
					// get FeatureClass from current dataset
					esriFeatureClass = featContainer.get_ClassByName(name);
					if (esriFeatureClass != null)
					{
						// if exists add to collection and quit
						colFCByName.Add(esriFeatureClass, name, null, null);
						return esriFeatureClass;
					}
				}
				catch { }
				// try another dataset
				esriDataset = enumDatasets.Next();
			}

			try
			{
				// try to find FeatureClass in workspace
				featContainer = (IFeatureClassContainer)workspace;
				esriFeatureClass = featContainer.get_ClassByName(name);
				if (esriFeatureClass != null)
				{
					// if exists add to collection and quit
					colFCByName.Add(esriFeatureClass, name, null, null);
					return esriFeatureClass;
				}
			}
			catch { }
			return null;
		}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:55,代码来源:ElementFeatureAssociation.cs

示例6: InitTreeRootNode

        /// <summary>
        /// ��ʼ��TreeView �� RootNode
        /// </summary>
        private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
        {
            DataView dataView = new DataView();
            dataView = dataTbl1.Copy().DefaultView;
            dataView.RowFilter = "Super_Position_ID = Position_ID";
            foreach (DataRowView drv in dataView)
            {
                Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
                tn.ID = drv["Position_ID"].ToString();
                tn.Text = "<span onmouseover=javascript:title='" + drv["Position_Description"].ToString() + "'>" + drv["Position_Name"].ToString() + "</span>";
                tn.ImageUrl = GetIcon("8");
                tn.NavigateUrl = "ListView.aspx?PositionID=" + tn.ID;
                tn.Target = "MainFrame";
                TNC.Add(tn);
                InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
                InitTreeChildNode(tn.Nodes, tn.ID);
            }

            dataTbl1 = null;
            dataTbl2 = null;
        }
开发者ID:blfsir,项目名称:benzoa,代码行数:24,代码来源:ControlPositionTreeView.ascx.cs

示例7: CreateField

 protected override SPField CreateField(Microsoft.SharePoint.SPFieldCollection fieldCollection)
 {
     TaxonomyField field = (TaxonomyField)fieldCollection.CreateNewField(FieldType, Name);
     fieldCollection.Add(field);
     return fieldCollection[Name];
 }
开发者ID:TypesInCode,项目名称:J.SharePoint,代码行数:6,代码来源:TaxonomyFieldMetadata.cs

示例8: InitTreeRootNode

        /// <summary>
        /// ��ʼ��TreeView �� RootNode
        /// </summary>
        private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
        {
            DataView dataView  = new DataView();
            dataView		   = dataTbl1.Copy().DefaultView;
            //	dataView.RowFilter = "ClassParentID = ClassID";
            foreach(DataRowView drv in dataView)
            {
                Microsoft.Web.UI.WebControls.TreeNode tn = new Microsoft.Web.UI.WebControls.TreeNode();
                tn.ID		   = drv["ClassID"].ToString();
                tn.Text		   = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
                //tn.ImageUrl    = GetIcon(drv["ClassType"].ToString());
                tn.NavigateUrl = "Switch.aspx?Action=1&ClassID="+drv["ClassID"].ToString();
                tn.Target      = "MainFrame";

                TNC.Add(tn);

                InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
                InitTreeChildNode(tn.Nodes,tn.ID);
            }
            dataTbl1 = null;
            dataTbl2 = null;
        }
开发者ID:blfsir,项目名称:benzoa,代码行数:25,代码来源:ControlProjectTreeView.ascx.cs

示例9: InitTreeRootNode

        /// <summary>
        /// ��ʼ��TreeView �� RootNode
        /// </summary>
        private void InitTreeRootNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC)
        {
            DataView dataView  = new DataView();
            dataView		   = dataTbl1.Copy().DefaultView;
            //	dataView.RowFilter = "ClassParentID = ClassID";
            foreach(DataRowView drv in dataView)
            {
                Microsoft.Web.UI.WebControls.TreeNode tn    = new Microsoft.Web.UI.WebControls.TreeNode();
                tn.ID		   = drv["ClassID"].ToString();
                tn.Text		   = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
                tn.ImageUrl    = GetIcon(drv["ClassType"].ToString());
                tn.NavigateUrl = "RightList.aspx?ClassID="+drv["ClassID"].ToString() + "&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
                tn.Target      = "RightList";
                TNC.Add(tn);
                InitChildNodeDataTable(Int32.Parse(tn.ID.ToString()));
                InitTreeChildNode(tn.Nodes,tn.ID);
            }
            dataTbl1 = null;
            dataTbl2 = null;

            Microsoft.Web.UI.WebControls.TreeNode tnn    = new Microsoft.Web.UI.WebControls.TreeNode();
            tnn.ID		   = "0";
            tnn.Text		   = "<span onmousemove=javascript:title='ȫ�ֶ���'>ȫ�ֶ���</span>";
            tnn.ImageUrl    = GetIcon("-1");
            tnn.NavigateUrl = "RightList.aspx?ClassID=0&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
            tnn.Target      = "RightList";
            TNC.Add(tnn);
        }
开发者ID:blfsir,项目名称:benzoa,代码行数:31,代码来源:ClassTree.aspx.cs

示例10: InitTreeChildNode

 /// <summary>
 /// ��ʼ��TreeView �� ChildNode
 /// </summary>
 private void InitTreeChildNode(Microsoft.Web.UI.WebControls.TreeNodeCollection TNC, string classParentID)
 {
     DataView dataView  = new DataView();
     dataView		   = dataTbl2.Copy().DefaultView ;
     dataView.RowFilter = "ClassParentID = " + classParentID + "";
     foreach(DataRowView drv in dataView)
     {
         Microsoft.Web.UI.WebControls.TreeNode tn    = new Microsoft.Web.UI.WebControls.TreeNode();
         tn.ID		   = drv["ClassID"].ToString();
         tn.Text		   = "<span onmousemove=javascript:title='"+drv["ClassName"]+"'>"+drv["ClassName"].ToString()+"</span>";
         tn.ImageUrl    = GetIcon(drv["ClassType"].ToString());
         tn.NavigateUrl = "RightList.aspx?ClassID="+drv["ClassID"].ToString() + "&SrcID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
         tn.Target      = "RightList";
         TNC.Add(tn);
         InitTreeChildNode(tn.Nodes,tn.ID);
     }
 }
开发者ID:blfsir,项目名称:benzoa,代码行数:20,代码来源:ClassTree.aspx.cs

示例11: SetParameterValue

 private void SetParameterValue(string parameterName, Microsoft.Practices.Prism.UriQuery query, double? value)
 {
     if (value.HasValue)
     {
         query.Add(parameterName, value.Value.ToString(CultureInfo.InvariantCulture));
     }
 }
开发者ID:kristian-pettersen,项目名称:torshify-r4dio,代码行数:7,代码来源:MainStationViewModel.cs


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