Ejemplo n.º 1
0
        internal static void AssemblyLoadFailed(DirectoryCatalog catalog, string fileName, Exception exception)
        {
            if (catalog == null)
            {
                throw new ArgumentNullException(nameof(catalog));
            }

            if (exception == null)
            {
                throw new ArgumentNullException(nameof(exception));
            }

            if (fileName == null)
            {
                throw new ArgumentNullException(nameof(fileName));
            }

            if (fileName.Length == 0)
            {
                throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(fileName)), nameof(fileName));
            }

            if (CompositionTraceSource.CanWriteWarning)
            {
                CompositionTraceSource.WriteWarning(CompositionTraceId.Discovery_AssemblyLoadFailed,
                                                    SR.CompositionTrace_Discovery_AssemblyLoadFailed,
                                                    catalog.GetDisplayName(),
                                                    fileName,
                                                    exception.Message);
            }
        }
Ejemplo n.º 2
0
        internal static void AssemblyLoadFailed(DirectoryCatalog catalog, string fileName, Exception exception)
        {
            Assumes.NotNull(catalog, exception);
            Assumes.NotNullOrEmpty(fileName);

            if (CompositionTraceSource.CanWriteWarning)
            {
                CompositionTraceSource.WriteWarning(CompositionTraceId.Discovery_AssemblyLoadFailed,
                                                    Strings.CompositionTrace_Discovery_AssemblyLoadFailed,
                                                    catalog.GetDisplayName(),
                                                    fileName,
                                                    exception.Message);
            }
        }