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


C# this.Combine方法代码示例

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


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

示例1: Type

        public static TypeArgumentSpecification Type(this TypeArgumentSpecification @this, Func<Type, TypeSpecification, TypeSpecification> typeSpecification)
        {
            Guard.NotNull(@this, "this");
            Guard.NotNull(typeSpecification, "typeSpecification");

            return @this.Combine(ta => typeSpecification(ta, TypeSpecificationBuilder.Any)(ta));
        }
开发者ID:shchimisyaotsel,项目名称:iSynaptic.Commons,代码行数:7,代码来源:TypeArgumentSpecification.cs

示例2: Type

        public static ParameterSpecification Type(this ParameterSpecification @this, Func<ParameterInfo, TypeSpecification, TypeSpecification> typeSpecification)
        {
            Guard.NotNull(@this, "this");
            Guard.NotNull(typeSpecification, "typeSpecification");

            return @this.Combine(p => typeSpecification(p, TypeSpecificationBuilder.Any)(p.ParameterType));
        }
开发者ID:iSynaptic,项目名称:iSynaptic.Commons,代码行数:7,代码来源:ParameterSpecificationBuilder.cs

示例3: GetReferenceVirtualPath

        public static string GetReferenceVirtualPath(this IVirtualPathProvider virtualPathProvider, string basePath, string referenceName, string hintPath) {
            // Check if hint path is valid
            if (!string.IsNullOrEmpty(hintPath)) {
                if (virtualPathProvider.TryFileExists(virtualPathProvider.Combine(basePath, hintPath)))
                    return hintPath;
            }

            // Fall back to bin directory
            string relativePath = virtualPathProvider.Combine("bin", referenceName + ".dll");
            if (virtualPathProvider.TryFileExists(virtualPathProvider.Combine(basePath, relativePath)))
                return relativePath;

            return null;
        }
开发者ID:RasterImage,项目名称:Orchard,代码行数:14,代码来源:VirtualPathProviderExtensions.cs

示例4: IsEqualTo

        public static TypeSpecification IsEqualTo(this TypeSpecification @this, Type expected)
        {
            Guard.NotNull(@this, "this");
            Guard.NotNull(expected, "expected");

            return @this.Combine(t => Outcome.FailIf(t != expected, String.Format("Not the expected type: {0}", expected.Name)));
        }
开发者ID:shchimisyaotsel,项目名称:iSynaptic.Commons,代码行数:7,代码来源:TypeSpecificationBuilder.cs

示例5: Named

        public static ParameterSpecification Named(this ParameterSpecification @this, string name)
        {
            Guard.NotNull(@this, "this");
            Guard.NotNullOrWhiteSpace(name, "name");

            return @this.Combine(x => Outcome.FailIf(x.Name != name, String.Format("Not named '{0}'.", name)));
        }
开发者ID:iSynaptic,项目名称:iSynaptic.Commons,代码行数:7,代码来源:ParameterSpecificationBuilder.cs

示例6: CombineToAppPath

        public static string CombineToAppPath(this IFolder folder, params string[] paths)
        {
            folder.ArgumentNullExceptionByNullOrEmpty("folder");
            folder.Root.ArgumentNullExceptionByNullOrEmpty("folder.Root");

            return PathUtility.PhysicsPathSeparatorCharConvertToVirtualPathSeparatorChar(Path.Combine(folder.Root.RootPath, folder.Combine(paths).TrimStart('/')));
        }
开发者ID:uwitec,项目名称:higirl360-taoke,代码行数:7,代码来源:IFolder.cs

示例7: BoundingBox

 public static Ani<Rect> BoundingBox(this Ani<Rect> rect1, Ani<Rect> rect2)
 {
     return rect1.Combine(rect2,
                          (r1, r2) => new Rect(
                              new Point(r1.X.Min(r2.X), r1.Y.Min(r2.Y)),
                              new Point(r1.Right.Max(r2.Right), r1.Bottom.Max(r2.Bottom))));
 }
开发者ID:siddht1,项目名称:AnimatronTheTerrible,代码行数:7,代码来源:Concurrency.cs

示例8: Combine

 public static Uri Combine(this Uri uri1, string[] additions)
 {
     foreach (var addition in additions)
     {
         uri1 = uri1.Combine(addition);
     }
     return uri1;
 }
开发者ID:Grummle,项目名称:PmtaUtilities,代码行数:8,代码来源:UriExtensions.cs

示例9: CombineAssert

		/// <summary>
		/// 	Combines two paths and makes sure the 
		/// 	DIRECTORY resulting from the combination exists
		/// 	by creating it with default permissions if it doesn't.
		/// </summary>
		/// <param name = "input">The path to combine the latter with.</param>
		/// <param name = "path">The latter path.</param>
		/// <returns>The combined path string.</returns>
		public static string CombineAssert(this string input, string path)
		{
			var p = input.Combine(path);

			if (!Directory.Exists(p))
				Directory.CreateDirectory(p);

			return p;
		}
开发者ID:bittercoder,项目名称:Windsor,代码行数:17,代码来源:Exts.cs

示例10: Combine

        /// <summary>
        /// Combines the specified <paramref name="password"/> with the specified <paramref name="salt"/>.
        /// </summary>
        /// <param name="self">The salt combiner.</param>
        /// <param name="salt">The salt.</param>
        /// <param name="iterationCount">The iteration count.</param>
        /// <param name="password">The password.</param>
        public static byte[] Combine(this ISaltCombiner self, byte[] salt, int iterationCount, byte[] password)
        {
            Guard.NotNull(self, nameof(self));
            Guard.NotNullOrEmpty(salt, nameof(salt));
            Guard.NotZeroOrNegative(iterationCount, nameof(iterationCount));
            Guard.NotNullOrEmpty(password, nameof(password));

            return self.Combine(salt, iterationCount, BitConverter.ToString(password));
        }
开发者ID:LeagueLogbook,项目名称:Logbook,代码行数:16,代码来源:SaltCombinerExtensions.cs

示例11: Combine

 public static string Combine(this IFileStorage fileStorage, params string[] paths)
 {
     var path = paths[0];
     for (int i = 1; i < paths.Length; i++)
     {
         path = fileStorage.Combine(path, paths[i]);
     }
     return path;
 }
开发者ID:scemino,项目名称:nscumm,代码行数:9,代码来源:IFileStorage.cs

示例12: GetExtensionFileProvider

        public static IOrchardFileSystem GetExtensionFileProvider(
            this IOrchardFileSystem parentFileSystem,
            ExtensionDescriptor extensionDescriptor,
            ILogger logger)
        {
            var subPath = parentFileSystem.Combine(extensionDescriptor.Location, extensionDescriptor.Id);

            return parentFileSystem
                .GetSubPathFileProvider(subPath, logger);
        }
开发者ID:jimitndiaye,项目名称:Orchard2,代码行数:10,代码来源:ExtensionsFileSystemExtensions.cs

示例13: GetProjectReferenceVirtualPath

        public static string GetProjectReferenceVirtualPath(this IVirtualPathProvider virtualPathProvider, string projectPath, string referenceName, string hintPath) {

            string basePath = virtualPathProvider.GetDirectoryName(projectPath);
            string virtualPath = virtualPathProvider.GetReferenceVirtualPath(basePath, referenceName, hintPath);

            if (!string.IsNullOrEmpty(virtualPath)) {
                return virtualPathProvider.Combine(basePath, virtualPath);
            }

            return null;
        }
开发者ID:RasterImage,项目名称:Orchard,代码行数:11,代码来源:VirtualPathProviderExtensions.cs

示例14: Combine

        public static string Combine(this string url, IEnumerable<SearchCriteria> searches, LogicalOperator logical, IEnumerable<SortDescription> sorting, int? pageCount)
        {
            var queries = new List<string>();
            if (pageCount.HasValue)
                queries.Add(GetPagingQueryString(pageCount.Value));
            if (searches != null && searches.Count() > 0)
                queries.Add(searches.ConstructFilterQueryString(logical));
            if (sorting != null && sorting.Count() > 0)
                queries.Add(sorting.ConstructOrderByQueryString());

            return url.Combine(queries);
        }
开发者ID:MYOB-Technology,项目名称:AccountRight_SampleApp_CSharp,代码行数:12,代码来源:QueryStringHelper.cs

示例15: Where

        public static SqlQuery Where(this SqlQuery query, ExpandoObject where, char prefix)
        {
            if (null != query && null != where)
            {
                IDictionary<string, object> dic = where;
                StringBuilder sql = query.Text;
                FilterCriteriaList criterias = new FilterCriteriaList(prefix);
                foreach (KeyValuePair<string, object> kvp in dic)
                {
                    criterias.Add(kvp.Key, null, ConditionOperator.Equals, kvp.Value);
                }

                query.Combine(criterias.ToQuery());
            }
            return query;
        }
开发者ID:mehmetgoren,项目名称:AppX.Data,代码行数:16,代码来源:SqlQueryExtensions.cs


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