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

C# ParameterList类代码示例

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

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



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

示例1: Initialize_NoLock

		void Initialize_NoLock() {
			try {
				if (initCounter++ != 0) {
					Debug.Fail("Initialize() called recursively");
					return;
				}

				if (parameterList == null)
					parameterList = new ParameterList(this, ownerType);

				declaringType2 = ownerType;
				InitNameAndAttributes_NoLock();
				InitRVA_NoLock();
				InitCustomAttributes_NoLock();
				InitDeclSecurities_NoLock();
				InitGenericParams_NoLock();
				InitSignature_NoLock();
				Debug.Assert(CanFreeMethodBody, "Can't free method body");
				FreeMethodBody();
				InitParamDefs_NoLock();
				ResetImplMap();
				semAttrs = 0;
				overrides = null;
				this.parameterList.UpdateParameterTypes();
				canFreeMethodBody = !ownerType.CompletelyLoaded;
			}
			finally {
				initCounter--;
			}
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:30,代码来源:CorMethodDef.cs


示例2: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            object valueA = parameters.GetParameter<object>("ValueA");
            object valueB = parameters.GetParameter<object>("ValueB");

            return valueA.Equals(valueB);
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:AreEqualFunction.cs


示例3: Execute

		public override object Execute(ParameterList parameters, FunctionContextContainer context)
		{
			var result = new List<FormEmail>();
			result.AddRange(parameters.GetParameter<IEnumerable<FormEmail>>("EmailA"));
			result.AddRange(parameters.GetParameter<IEnumerable<FormEmail>>("EmailB"));
			return result;
		}
开发者ID:JustAndrei,项目名称:C1-Packages,代码行数:7,代码来源:JoinEmailsFunction.cs


示例4: Create

        public override ISource Create(Uri uri, string pageData)
        {
            string userHref = uri.Host;
            string username = userHref.Split('.')[0];

            string title = pageData.GetStringBetween("<title>", "</title>").Trim();
            string currentPageStr = pageData.GetStringBetween("<span id=\"pagination_current_page\"", ">", "<");
            string totalPagesStr = pageData.GetStringBetween("<span id=\"pagination_total_pages\"", ">", "<");

            string pagingUrl = pageData.GetStringBetween("<div class=\"view_pages_page\"", " href=\"", "\"");
            string pagingUrlFormat = Regex.Replace(pagingUrl, @"page=\d+", "page={0}");

            ParameterList parameters = new ParameterList();
            parameters.AddValue(VideoChannelSourceCreator.UserParameterName, username);
            parameters.AddValue(VideoChannelSourceCreator.UserHrefParameterName, userHref);
            parameters.AddValue(VideoChannelSourceCreator.TitleParameterName, title);
            parameters.AddValue(CurrentPageParameterName, int.Parse(currentPageStr));
            parameters.AddValue(TotalPagesParameterName, int.Parse(totalPagesStr));
            parameters.AddValue(PagingUrlFormatParameterName, pagingUrlFormat);

            BlipVideoChannelSource channelSource = new BlipVideoChannelSource(uri, this, parameters);

            var downloadSources = ParseDownloadSources(pageData, channelSource);
            foreach (var downloadSource in downloadSources)
                channelSource.Add(downloadSource);

            return channelSource;
        }
开发者ID:jdauie,项目名称:squid,代码行数:28,代码来源:BlipVideoChannelSourceCreator.cs


示例5: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            var metaTags = new List<XElement>();

            string contentType = parameters.GetParameter<string>("ContentType");
            string designer = parameters.GetParameter<string>("Designer");
            bool showGenerator = parameters.GetParameter<bool>("ShowGenerator");

            if (!string.IsNullOrWhiteSpace(contentType))
            {
                metaTags.Add(new XElement(Namespaces.Xhtml + "meta",
                    new XAttribute("http-equiv", "Content-Type"),
                    new XAttribute("content", contentType)));
            }

            if (!string.IsNullOrWhiteSpace(designer))
            {
                metaTags.Add(new XElement(Namespaces.Xhtml + "meta",
                    new XAttribute("name", "Designer"),
                    new XAttribute("content", designer)));
            }

            if (showGenerator)
            {
                metaTags.Add(new XElement(Namespaces.Xhtml + "meta",
                    new XAttribute("name", "Generator"),
                    new XAttribute("content", "Composite C1 CMS - Free Open Source from http://composite.net/")));
            }

            return metaTags;
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:31,代码来源:CommonMetaTagsFunction.cs


示例6: GetWidgetMarkup

        public override XElement GetWidgetMarkup(ParameterList parameters, string label, HelpDefinition help, string bindingSourceName)
        {
            XElement widgetMarkup = base.BuildBasicWidgetMarkup("DataReferenceSelector", "Selected", label, help, bindingSourceName);
            widgetMarkup.Add(new XElement("DataReferenceSelector.DataType", typeof(IMediaFileFolder).AssemblyQualifiedName));

            return widgetMarkup;
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:MediaFolderSelectorWidget.cs


示例7: Data

        public Data(EntityId readerId, EntityId writerId, long seqNum, ParameterList inlineQosParams, SerializedPayload payload)
            : base(SubMessageKind.DATA)
        {
            this.readerId = readerId;
            this.writerId = writerId;
            this.writerSN = new SequenceNumber(seqNum);

            if (inlineQosParams != null && inlineQosParams.Value.Count > 0)
            {
                Header.FlagsValue |= 0x2;
                this.inlineQosParams = inlineQosParams;
            }

            if (payload.ContainsData())
            {
                Header.FlagsValue |= Flags.DataFlag; // dataFlag
            }
            else
            {
                Header.FlagsValue |= Flags.KeyFlag; // keyFlag
            }


            this.serializedPayload = payload;
        }
开发者ID:Egipto87,项目名称:DOOP.ec,代码行数:25,代码来源:Data.cs


示例8: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            IComparable valueA = parameters.GetParameter<IComparable>("ValueA");
            IComparable valueB = parameters.GetParameter<IComparable>("ValueB");

            return valueA.CompareTo(valueB);
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:IsLessThanFunction.cs


示例9: MethodResponse

		public MethodResponse(string content)
		{
			this.Parameters = new ParameterList();
			LoadOptions options = LoadOptions.None;
			XDocument xDocument = XDocument.Parse(content, options);
			XElement root = xDocument.Root;
			XElement xElement = root.Element("fault");
			if (xElement != null)
			{
				Fault fault = Fault.ParseXml(xElement);
				string message = string.Format("XMLRPC FAULT [{0}]: \"{1}\"", fault.FaultCode, fault.FaultString);
				throw new XmlRPCException(message)
				{
					Fault = fault
				};
			}
			XElement element = root.GetElement("params");
			List<XElement> list = element.Elements("param").ToList<XElement>();
			foreach (XElement current in list)
			{
				XElement element2 = current.GetElement("value");
				Value value = Value.ParseXml(element2);
				this.Parameters.Add(value);
			}
		}
开发者ID:WhitePoplar022,项目名称:CloudNotes,代码行数:25,代码来源:MethodResponse.cs


示例10: ChannelSource

        protected ChannelSource(Uri uri, ChannelSourceCreator creator, ParameterList parameters)
            : base(uri, parameters)
        {
            SetParameterValue(ChannelSourceCreator.CreatorParameterName, creator);

            DownloadSources = new ObservableDownloadSourceCollection();
        }
开发者ID:jdauie,项目名称:squid,代码行数:7,代码来源:ChannelSource.cs


示例11: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            SitemapScope SitemapScope;
            if (parameters.TryGetParameter<SitemapScope>("SitemapScope", out SitemapScope) == false)
            {
                SitemapScope = SitemapScope.Current;
            }

            Guid pageId = Guid.Empty;

            switch (SitemapScope)
            {
                case SitemapScope.Current:
                    pageId = PageRenderer.CurrentPageId;
                    break;
                case SitemapScope.Parent:
                case SitemapScope.Level1:
                case SitemapScope.Level2:
                case SitemapScope.Level3:
                case SitemapScope.Level4:
                    IEnumerable<Guid> pageIds = PageStructureInfo.GetAssociatedPageIds(PageRenderer.CurrentPageId, SitemapScope);
                    pageId = pageIds.FirstOrDefault();
                    break;
                default:
                    throw new NotImplementedException("Unhandled SitemapScope type: " + SitemapScope.ToString());
            }

            return pageId;
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:29,代码来源:GetPageIdFunction.cs


示例12: Statement

 internal Statement(IHost host)
     : base(host)
 {
     Attributes = new AttributeList(host);
     Children = new StatementList(host);
     Parameters = new ParameterList(host);
 }
开发者ID:darrelmiller,项目名称:Parrot,代码行数:7,代码来源:Statement.cs


示例13: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            string commaSeparatedSearchTerms = parameters.GetParameter<string>("CommaSeparatedGuids");

            if (!commaSeparatedSearchTerms.IsNullOrEmpty())
            {
                ParameterExpression parameter = Expression.Parameter(typeof(Guid), "g");

                IEnumerable<string> guidStrings = commaSeparatedSearchTerms.Split(',');

                Expression body = null;

                foreach (string guidString in guidStrings)
                {
                    Guid temp = new Guid(guidString.Trim());

                    Expression part = Expression.Equal(parameter, Expression.Constant(temp));

                    body = body.NestedOr(part);
                }

                if(body != null)
                {
                    return Expression.Lambda<Func<Guid, bool>>(body, parameter);
                }
            }

            return (Expression<Func<Guid, bool>>) (f => false);
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:29,代码来源:GuidInCommaSeparatedListPredicateFunction.cs


示例14: GetWidgetMarkup

        public override XElement GetWidgetMarkup(ParameterList parameters, string label, HelpDefinition help, string bindingSourceName)
        {
            string markup = parameters.GetParameter<string>(MarkupParameterName) ?? "";

            if (string.IsNullOrWhiteSpace(markup))
            {
                return null;
            }

            markup = @"<cms:formdefinition xmlns:cms=""http://www.composite.net/ns/management/bindingforms/1.0"" xmlns=""http://www.composite.net/ns/management/bindingforms/std.ui.controls.lib/1.0"">"
                      + markup
                      + "</cms:formdefinition>";

            XElement xml = XElement.Parse(markup);

            foreach (var attribute in xml.Descendants().SelectMany(node => node.Attributes()))
            {
                attribute.Value = attribute.Value
                                    .Replace("$label",  label)
                                    .Replace("$binding", bindingSourceName)
                                    .Replace("$help", help != null ? help.HelpText : "");
            }

            return xml.Elements().FirstOrDefault();
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:25,代码来源:FormMarkupWidgetFuntion.cs


示例15: Execute

		public override object Execute(ParameterList parameters, FunctionContextContainer context)
		{
			var result = new XhtmlDocument();
			var functionCall = new XElement(Composite.Core.Xml.Namespaces.Function10 + "function",
				new XAttribute("name", "Composite.Forms.RendererControl"));
			BaseRuntimeTreeNode paramNode = null;

			foreach (var parameterName in parameters.AllParameterNames)
			{
				try
				{

					if (parameters.TryGetParameterRuntimeTreeNode(parameterName, out paramNode))
					{
						functionCall.Add(paramNode.Serialize());
					}
				}
				//Ignore
				catch { }
			}
			result.Body.Add(
				new XElement(Namespaces.AspNetControls + "form",
					functionCall));
			return result;
		}
开发者ID:JustAndrei,项目名称:C1-Packages,代码行数:25,代码来源:FormsRendererFunction.cs


示例16: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            IEnumerable<string> strings = parameters.GetParameter<IEnumerable<string>>("Strings");
            string separator = parameters.GetParameter<string>("Separator");

            return string.Join(separator, strings.ToArray());
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:Join.cs


示例17: Execute

        public override object Execute(ParameterList parameters, FunctionContextContainer context)
        {
            IEnumerable elements = parameters.GetParameter<IEnumerable>("Elements");
            string keyPropertyName = parameters.GetParameter<string>("KeyPropertyName");
            string valuePropertyName = parameters.GetParameter<string>("ValuePropertyName");

            Dictionary<string, string> resultDictionary = new Dictionary<string, string>();

            PropertyInfo keyPropertyInfo = null;
            PropertyInfo valuePropertyInfo = null;
            foreach (object element in elements)
            {
                if (keyPropertyInfo == null)
                {
                    keyPropertyInfo = element.GetType().GetProperty(keyPropertyName);
                }

                if (valuePropertyInfo == null)
                {
                    valuePropertyInfo = element.GetType().GetProperty(valuePropertyName);
                }

                string keyValue = keyPropertyInfo.GetValue(element, null).ToString();
                string valueValue = valuePropertyInfo.GetValue(element, null).ToString();

                resultDictionary.Add(keyValue, valueValue);
            }

            return resultDictionary;
        }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:30,代码来源:EnumerableToDictionary.cs


示例18: Execute

 public override object Execute(ParameterList parameters, FunctionContextContainer context)
 {
     return new TitleControl {
         PrefixToRemove = parameters.GetParameter<string>("PrefixToRemove"),
         PostfixToRemove = parameters.GetParameter<string>("PostfixToRemove")
     };
 }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:7,代码来源:HtmlTitleValueFunction.cs


示例19: Create

        public override ISource Create(Uri uri, string pageData)
        {
            string userHref = pageData.GetStringBetween("<link rel=\"canonical\"", " href=\"", "\"");
            string username = userHref.GetStringBetween("/user/", null);

            string title = pageData.GetStringBetween("<meta name=\"title\" content=\"", "\"");
            string description = pageData.GetStringBetween("<meta name=\"description\" content=\"", "\"");
            string thumbnail = pageData.GetStringBetween("<meta property=\"og:image\" content=\"", "\"");

            // thumbnail format changed (no http/s)
            // //i1.ytimg.com/i/dbL-i29FDPYok8X8yIynNQ/1.jpg?v=9aee31

            string ajaxSessionInfo = pageData.GetStringBetween("window.ajax_session_info", "'", "'");

            var parameters = new ParameterList();
            parameters.AddValue(UserParameterName, username);
            parameters.AddValue(UserHrefParameterName, userHref);
            parameters.AddValue(TitleParameterName, title);
            parameters.AddValue(DescriptionParameterName, description);
            parameters.AddValue(ThumbnailParameterName, thumbnail);
            parameters.AddValue(AjaxSessionInfoParameterName, ajaxSessionInfo);

            var channelSource = new YoutubeVideoChannelSource(uri, this, parameters);

            var downloadSources = ParseDownloadSources(pageData, channelSource);
            foreach (var downloadSource in downloadSources)
                channelSource.Add(downloadSource);

            return channelSource;
        }
开发者ID:jdauie,项目名称:squid,代码行数:30,代码来源:YoutubeVideoChannelSourceCreator.cs


示例20: PlayLandFromHand

		public PlayLandFromHand(ParameterList<IContext> extraParameters):base(extraParameters) {
			Func<IContext,List<string>> identitySelector = (context) => {
				var card = context as Card;
				return new List<string> () { card.Id }; 
			};
			parameters.Add(new Parameter<IContext>("target",identitySelector));
		}
开发者ID:,项目名称:,代码行数:7,代码来源:



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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