예제 #1
0
        /* #region Public Static Methods */
        /// <summary>
        /// Gets a value indicating whether the file matches a convention type.
        /// </summary>
        /// <param name="fileInfo"></param>
        /// <param name="convention"></param>
        /// <returns></returns>
        public static bool IsOfConventionType(this ISerializableFileInfo fileInfo, IFileNamingConvention convention)
        {
            var noExt   = Path.GetFileNameWithoutExtension(fileInfo.FullName);
            var isMatch = Regex.IsMatch(noExt, convention.RegexPattern, RegexOptions.IgnoreCase);

            return(isMatch);
        }
 /* #endregion Interface: 'Maptz.Avid.Rushes.IConventionFileInfo' Properties */
 /* #region Public Constructors */
 public ConventionFormFileInfo(ISerializableFileInfo baseFileInfo, IFileNamingConvention convention)
 {
     this.BaseFileInfo = baseFileInfo;
     this.Convention   = convention;
 }