// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Windows.Data;
namespace Microsoft.Management.UI.Internal
{
///
/// The IsNotNullConverter is responsible for converting a value into
/// a boolean indicting whether the value is not null.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
public class IsNotNullConverter : IValueConverter
{
#region IValueConverter Members
///
/// Determines if value is not null.
///
/// The object to check.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// Returns true if value is not null, false otherwise.
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value != null;
}
///
/// This method is not used.
///
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
#endregion
}
}