Exemplo n.º 1
0
        /// <summary>   Query if this  has registered application configuration. </summary>
        ///
        /// <remarks>   Ken, 10/3/2020. </remarks>
        ///
        /// <returns>   True if registered application configuration, false if not. </returns>

        private bool HasRegisteredAppConfig()
        {
            var appName        = this.GeneratorConfiguration.AppName;
            var appDescription = this.GeneratorConfiguration.AppDescription;
            var clientId       = this.GeneratorConfiguration.ClientId;
            var clientSecret   = this.GeneratorConfiguration.ClientSecret;

            return(CompareExtensions.AnyAreNotNull(appName, appDescription, clientId, clientSecret));
        }
        public void LikeExtensionCorrectlyResolves(string test, string data, bool shouldMatch)
        {
            //arrange

            //act
            var result = CompareExtensions.Like(data, test);

            //assert

            Assert.Equal(result, shouldMatch);
        }
Exemplo n.º 3
0
        public static bool operator !=(VSSolution a, VSSolution b)
        {
            bool equal;

            if (CompareExtensions.CheckNullEquality(a, b, out equal))
            {
                return(!equal);
            }

            return(!a.Equals(b));
        }
Exemplo n.º 4
0
        public static bool operator ==(VSProjectItem a, VSProjectItem b)
        {
            bool equal;

            if (CompareExtensions.CheckNullEquality(a, b, out equal))
            {
                return(equal);
            }

            return(a.Equals(b));
        }
Exemplo n.º 5
0
        public static bool operator !=(NpmVersion version1, NpmVersion version2)
        {
            bool equals;
            NpmVersionComparison comparison;

            if (CompareExtensions.CheckNullEquality(version1, version2, out equals))
            {
                return(!equals);
            }

            comparison = NpmVersion.GetComparison(version1, version2);

            return(!comparison.HasFlag(NpmVersionComparison.Equals));
        }
Exemplo n.º 6
0
        private static bool Equals(Module module1, Module module2)
        {
            bool equals;

            if (CompareExtensions.CheckNullEquality(module1, module2, out equals))
            {
                return(equals);
            }
            else
            {
                if (CompareExtensions.CheckNullEquality(module1.BaseObject, module2.BaseObject, out equals))
                {
                    return(equals);
                }
                else
                {
                    return(module1.Name == module2.Name && module1.BaseObject.Name == module2.BaseObject.Name);
                }
            }
        }