Or

We found 10 examples in language CSharp for this search. You will see 40 fragments of code.
using Asam.Ppc.Domain.CommonModule;

namespace Asam.Ppc.Domain.AssessmentModule.Psychological
{
    public class PsychologicalOrEmotionalProblems : Lookup
    {
        /// <summary>
        ///     None = 0.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ProblemsWontInterfere = new PsychologicalOrEmotionalProblems
            {
                Code = "None",
                SortOrder = 1,
                Value = 0
            };

        /// <summary>
        ///     AnxietyDisorder = 1.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems AnxietyDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "AnxietyDisorder",
                SortOrder = 2,
                Value = 1
            };

        /// <summary>
        ///     PanicDisorder = 2.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems PanicDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "PanicDisorder",
                SortOrder = 3,
                Value = 2
            };

        /// <summary>
        ///     Agoraphobia = 3.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems Agoraphobia = new PsychologicalOrEmotionalProblems
            {
                Code = "Agoraphobia",
                SortOrder = 4,
                Value = 3
            };

        /// <summary>
        ///     PostTraumaticStressDisorder = 4.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems PostTraumaticStressDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "PostTraumaticStressDisorder",
                SortOrder = 5,
                Value = 4
            };

        /// <summary>
        ///     SocialPhobia = 5.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems SocialPhobia = new PsychologicalOrEmotionalProblems
            {
                Code = "SocialPhobia",
                SortOrder = 6,
                Value = 5
            };

        /// <summary>
        ///     ObsessiveCompulsiveDisorder = 6.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ObsessiveCompulsiveDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "ObsessiveCompulsiveDisorder",
                SortOrder = 7,
                Value = 6
            };

        /// <summary>
        ///     EatingDisorder = 7.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems EatingDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "EatingDisorder",
                SortOrder = 8,
                Value = 7
            };

        /// <summary>
        ///     DepressiveDisorder = 8.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems DepressiveDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "DepressiveDisorder",
                SortOrder = 9,
                Value = 8
            };

        /// <summary>
        ///     ManiaOrBipolarDisorder = 9.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ManiaOrBipolarDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "ManiaOrBipolarDisorder",
                SortOrder = 10,
                Value = 9
            };

        /// <summary>
        ///     SchizophreniaPsychoticOrThoughtDisorder = 10.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems SchizophreniaPsychoticOrThoughtDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "SchizophreniaPsychoticOrThoughtDisorder",
                SortOrder = 11,
                Value = 10
            };

        /// <summary>
        ///     BorderlineParanoidAntisocialOrOtherPersonalityDisorder = 11.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems BorderlineParanoidAntisocialOrOtherPersonalityDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "BorderlineParanoidAntisocialOrOtherPersonalityDisorder",
                SortOrder = 12,
                Value = 11
            };

        /// <summary>
        ///     Other = 12.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems Other = new PsychologicalOrEmotionalProblems
            {
                Code = "Other",
                SortOrder = 13,
                Value = 12
            };
    }
}

		[Test]
		[ExpectedException (typeof (ArgumentNullException))]
		public void Arg1Null ()
		{
			Expression.Or (null, Expression.Constant (1));
		}

		[Test]
		[ExpectedException (typeof (ArgumentNullException))]
		public void Arg2Null ()
		{
			Expression.Or (Expression.Constant (1), null);
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void NoOperatorClass ()
		{
			Expression.Or (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void ArgTypesDifferent ()
		{
			Expression.Or (Expression.Constant (1), Expression.Constant (true));
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void Double ()
		{
			Expression.Or (Expression.Constant (1.0), Expression.Constant (2.0));
		}

		[Test]
		public void Integer ()
		{
			BinaryExpression expr = Expression.Or (Expression.Constant (1), Expression.Constant (2));
			Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#01");
			Assert.AreEqual (typeof (int), expr.Type, "Or#02");
			Assert.IsNull (expr.Method, "Or#03");
			Assert.AreEqual ("(1 | 2)", expr.ToString(), "Or#04");
		}

/*  Company :       Nequeo Pty Ltd, http://www.nequeo.com.au/
 *  Copyright :     Copyright © Nequeo Pty Ltd 2015 http://www.nequeo.com.au/
 * 
 *  File :          
 *  Purpose :       
 * 
 */

#region Nequeo Pty Ltd License
/*
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nequeo.Net.Maps.Microsoft
{
    /// <summary>
    /// Geocoding model.
    /// </summary>
    public class Geocoding
    {
        /// <summary>
        /// Gets or sets the authentication result code.
        /// </summary>
        public string AuthenticationResultCode { get; set; }

        /// <summary>
        /// Gets or sets the brand logo uri.
        /// </summary>
        public string BrandLogoUri { get; set; }

        /// <summary>
        /// Gets or sets the copyright.
        /// </summary>
        public string Copyright { get; set; }

        /// <summary>
        /// Gets or sets the array of resource sets.
        /// </summary>
        public ResourceSet[] ResourceSets { get; set; }

        /// <summary>
        /// Gets or sets the status code.
        /// </summary>
        public int StatusCode { get; set; }

        /// <summary>
        /// Gets or sets the status description.
        /// </summary>
        public string StatusDescription { get; set; }

        /// <summary>
        /// Gets or sets the trace ID.
        /// </summary>
        public string TraceId { get; set; }
    }

    /// <summary>
    /// Resource set model.
    /// </summary>
    public class ResourceSet
    {
        /// <summary>
        /// Gets or sets the estimated total.
        /// </summary>
        public int EstimatedTotal { get; set; }

        /// <summary>
        /// Gets or sets the resource array.
        /// </summary>
        public Resource[] Resources { get; set; }
    }

    /// <summary>
    /// Resource model.
    /// </summary>
    public class Resource
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string __type { get; set; }

        /// <summary>
        /// Gets or sets the b-box.
        /// </summary>
        public double[] Bbox { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the point.
        /// </summary>
        public Point Point { get; set; }

        /// <summary>
        /// Gets or sets the address.
        /// </summary>
        public Address Address { get; set; }

        /// <summary>
        /// Gets or sets the confidence.
        /// </summary>
        public string Confidence { get; set; }

        /// <summary>
        /// Gets or sets the entity type.
        /// </summary>
        public string EntityType { get; set; }

        /// <summary>
        /// Gets or sets the geocode points.
        /// </summary>
        public GeocodePoint[] GeocodePoints { get; set; }

        /// <summary>
        /// Gets or sets the match codes.
        /// </summary>
        public string[] MatchCodes { get; set; }
    }

    /// <summary>
    /// Point model.
    /// </summary>
    public class Point
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the coordinates.
        /// </summary>
        public double[] Coordinates { get; set; }
    }

    /// <summary>
    /// Address model.
    /// </summary>
    public class Address
    {
        /// <summary>
        /// Gets or sets the address.
        /// </summary>
        public string AddressLine { get; set; }

        /// <summary>
        /// Gets or sets the district.
        /// </summary>
        public string AdminDistrict { get; set; }

        /// <summary>
        /// Gets or sets the district.
        /// </summary>
        public string AdminDistrict2 { get; set; }

        /// <summary>
        /// Gets or sets the country region.
        /// </summary>
        public string CountryRegion { get; set; }

        /// <summary>
        /// Gets or sets the formatted address.
        /// </summary>
        public string FormattedAddress { get; set; }

        /// <summary>
        /// Gets or sets the locality.
        /// </summary>
        public string Locality { get; set; }

        /// <summary>
        /// Gets or sets the neighborhood.
        /// </summary>
        public string Neighborhood { get; set; }

        /// <summary>
        /// Gets or sets the landmark.
        /// </summary>
        public string Landmark { get; set; }

        /// <summary>
        /// Gets or sets the postal code.
        /// </summary>
        public string PostalCode { get; set; }
    }

    /// <summary>
    /// Geocode point model.
    /// </summary>
    public class GeocodePoint
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the coordinates.
        /// </summary>
        public double[] Coordinates { get; set; }

        /// <summary>
        /// Gets or sets the calculation method.
        /// </summary>
        public string CalculationMethod { get; set; }

        /// <summary>
        /// Gets or sets the usage types.
        /// </summary>
        public string[] UsageTypes { get; set; }
    }
}

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HBPreset.cs" company="HandBrake Project (http://handbrake.fr)">
//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
//   The preset.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace HandBrake.ApplicationServices.Interop.Json.Presets
{
    using System.Collections.Generic;

    /// <summary>
    ///     The preset.
    /// </summary>
    public class HBPreset
    {
        /// <summary>
        /// Gets or sets the audio copy mask.
        /// </summary>
        public List<string> AudioCopyMask { get; set; }

        /// <summary>
        /// Gets or sets the audio encoder fallback.
        /// </summary>
        public string AudioEncoderFallback { get; set; }

        /// <summary>
        /// Gets or sets the audio language list.
        /// </summary>
        public List<string> AudioLanguageList { get; set; }

        /// <summary>
        /// Gets or sets the audio list.
        /// </summary>
        public List<AudioList> AudioList { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether audio secondary encoder mode.
        /// </summary>
        public bool AudioSecondaryEncoderMode { get; set; }

        /// <summary>
        /// Gets or sets the audio track selection behavior.
        /// </summary>
        public string AudioTrackSelectionBehavior { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether chapter markers.
        /// </summary>
        public bool ChapterMarkers { get; set; }

        /// <summary>
        /// Gets or sets the children array.
        /// </summary>
        public List<object> ChildrenArray { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether default.
        /// </summary>
        public bool Default { get; set; }

        /// <summary>
        /// Gets or sets the file format.
        /// </summary>
        public string FileFormat { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether folder.
        /// </summary>
        public bool Folder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether folder open.
        /// </summary>
        public bool FolderOpen { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether mp 4 http optimize.
        /// </summary>
        public bool Mp4HttpOptimize { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether mp 4 i pod compatible.
        /// </summary>
        public bool Mp4iPodCompatible { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether picture auto crop.
        /// </summary>
        public bool PictureAutoCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture bottom crop.
        /// </summary>
        public int PictureBottomCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture left crop.
        /// </summary>
        public int PictureLeftCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture right crop.
        /// </summary>
        public int PictureRightCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture top crop.
        /// </summary>
        public int PictureTopCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture dar width.
        /// </summary>
        public int PictureDARWidth { get; set; }

        /// <summary>
        /// Gets or sets the picture deblock.
        /// </summary>
        public int PictureDeblock { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether picture decomb deinterlace.
        /// </summary>
        public string PictureDeinterlaceFilter { get; set; }

        /// <summary>
        /// Gets or sets the picture deinterlace preset.
        /// </summary>
        public string PictureDeinterlacePreset { get; set; }

        /// <summary>
        /// Gets or sets the picture deinterlace custom.
        /// </summary>
        public string PictureDeinterlaceCustom { get; set; }

        /// <summary>
        /// Gets or sets the picture denoise custom.
        /// </summary>
        public string PictureDenoiseCustom { get; set; }

        /// <summary>
        /// Gets or sets the picture denoise filter.
        /// </summary>
        public string PictureDenoiseFilter { get; set; }

        /// <summary>
        /// Gets or sets the picture denoise preset.
        /// </summary>
        public string PictureDenoisePreset { get; set; }

        /// <summary>
        /// Gets or sets the picture denoise tune.
        /// </summary>
        public string PictureDenoiseTune { get; set; }

        /// <summary>
        /// Gets or sets the picture detelecine.
        /// </summary>
        public string PictureDetelecine { get; set; }

        /// <summary>
        /// Gets or sets the picture detelecine custom.
        /// </summary>
        public string PictureDetelecineCustom { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether picture itu par.
        /// </summary>
        public bool PictureItuPAR { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether picture keep ratio.
        /// </summary>
        public bool PictureKeepRatio { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether picture loose crop.
        /// </summary>
        public bool PictureLooseCrop { get; set; }

        /// <summary>
        /// Gets or sets the picture modulus.
        /// </summary>
        public int PictureModulus { get; set; }

        /// <summary>
        /// Gets or sets the picture par.
        /// </summary>
        public string PicturePAR { get; set; }

        /// <summary>
        /// Gets or sets the picture par width.
        /// </summary>
        public int PicturePARWidth { get; set; }

        /// <summary>
        /// Gets or sets the picture par height.
        /// </summary>
        public int PicturePARHeight { get; set; }

        /// <summary>
        /// Gets or sets the picture rotate.
        /// </summary>
        public int PictureRotate { get; set; }

        /// <summary>
        /// Gets or sets the picture width.
        /// </summary>
        public int? PictureWidth { get; set; }

        /// <summary>
        /// Gets or sets the picture height.
        /// </summary>
        public int? PictureHeight { get; set; }

        /// <summary>
        /// Gets or sets the picture force height.
        /// </summary>
        public int PictureForceHeight { get; set; }

        /// <summary>
        /// Gets or sets the picture force width.
        /// </summary>
        public int PictureForceWidth { get; set; }

        /// <summary>
        /// Gets or sets the preset description.
        /// </summary>
        public string PresetDescription { get; set; }

        /// <summary>
        /// Gets or sets the preset name.
        /// </summary>
        public string PresetName { get; set; }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether uses picture filters.
        /// </summary>
        public bool UsesPictureFilters { get; set; }

        /// <summary>
        /// Gets or sets the uses picture settings.
        /// </summary>
        public int UsesPictureSettings { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether subtitle add cc.
        /// </summary>
        public bool SubtitleAddCC { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether subtitle add foreign audio search.
        /// </summary>
        public bool SubtitleAddForeignAudioSearch { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether subtitle add foreign audio subtitle.
        /// </summary>
        public bool SubtitleAddForeignAudioSubtitle { get; set; }

        /// <summary>
        /// Gets or sets the subtitle burn behavior.
        /// </summary>
        public string SubtitleBurnBehavior { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether subtitle burn bd sub.
        /// </summary>
        public bool SubtitleBurnBDSub { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether subtitle burn dvd sub.
        /// </summary>
        public bool SubtitleBurnDVDSub { get; set; }

        /// <summary>
        /// Gets or sets the subtitle language list.
        /// </summary>
        public List<string> SubtitleLanguageList { get; set; }

        /// <summary>
        /// Gets or sets the subtitle track selection behavior.
        /// </summary>
        public string SubtitleTrackSelectionBehavior { get; set; }

        /// <summary>
        /// Gets or sets the video avg bitrate.
        /// </summary>
        public int VideoAvgBitrate { get; set; }

        /// <summary>
        /// Gets or sets the video color matrix code.
        /// </summary>
        public int VideoColorMatrixCode { get; set; }

        /// <summary>
        /// Gets or sets the video encoder.
        /// </summary>
        public string VideoEncoder { get; set; }

        /// <summary>
        /// Gets or sets the video framerate.
        /// </summary>
        public string VideoFramerate { get; set; }

        /// <summary>
        /// Gets or sets the video framerate mode.
        /// </summary>
        public string VideoFramerateMode { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether video gray scale.
        /// </summary>
        public bool VideoGrayScale { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether video hw decode.
        /// </summary>
        public bool VideoHWDecode { get; set; }

        /// <summary>
        /// Gets or sets the video scaler.
        /// </summary>
        public string VideoScaler { get; set; }

        /// <summary>
        /// Gets or sets the video preset.
        /// </summary>
        public string VideoPreset { get; set; }

        /// <summary>
        /// Gets or sets the video tune.
        /// </summary>
        public string VideoTune { get; set; }

        /// <summary>
        /// Gets or sets the video profile.
        /// </summary>
        public string VideoProfile { get; set; }

        /// <summary>
        /// Gets or sets the video level.
        /// </summary>
        public string VideoLevel { get; set; }

        /// <summary>
        /// Gets or sets the video option extra.
        /// </summary>
        public string VideoOptionExtra { get; set; }

        /// <summary>
        /// Gets or sets the video quality type.
        /// </summary>
        public int VideoQualityType { get; set; }

        /// <summary>
        /// Gets or sets the video quality slider.
        /// </summary>
        public double VideoQualitySlider { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether video qsv decode.
        /// </summary>
        public bool VideoQSVDecode { get; set; }

        /// <summary>
        /// Gets or sets the video qsv async depth.
        /// </summary>
        public int VideoQSVAsyncDepth { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether video two pass.
        /// </summary>
        public bool VideoTwoPass { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether video turbo two pass.
        /// </summary>
        public bool VideoTurboTwoPass { get; set; }

        /// <summary>
        /// Gets or sets the x 264 option.
        /// </summary>
        public string x264Option { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether x 264 use advanced options.
        /// </summary>
        public bool x264UseAdvancedOptions { get; set; }
    }
}

            [Fact]
            public async Task SendAsyncSendsANonBlockingInvocationMessage()
            {
                var connection = new TestConnection();
                var hubConnection = CreateHubConnection(connection);
                try
                {
                    await hubConnection.StartAsync().OrTimeout();

                    var invokeTask = hubConnection.SendAsync("Foo").OrTimeout();

                    var invokeMessage = await connection.ReadSentTextMessageAsync().OrTimeout();

                    // ReadSentTextMessageAsync strips off the record separator (because it has use it as a separator now that we use Pipelines)
                    Assert.Equal("{\"type\":1,\"target\":\"Foo\",\"arguments\":[]}", invokeMessage);

                    await invokeTask.OrTimeout();
                }
                finally
                {
                    await hubConnection.DisposeAsync().OrTimeout();
                    await connection.DisposeAsync().OrTimeout();
                }
            }

            [Fact]
            public async Task ClientSendsHandshakeMessageWhenStartingConnection()
            {
                var connection = new TestConnection(autoHandshake: false);
                var hubConnection = CreateHubConnection(connection);
                try
                {
                    // We can't await StartAsync because it depends on the negotiate process!
                    var startTask = hubConnection.StartAsync();

                    var handshakeMessage = await connection.ReadHandshakeAndSendResponseAsync().OrTimeout();

                    // ReadSentTextMessageAsync strips off the record separator (because it has use it as a separator now that we use Pipelines)
                    Assert.Equal("{\"protocol\":\"json\",\"version\":1}", handshakeMessage);

                    await startTask.OrTimeout();
                }
                finally
                {
                    await hubConnection.DisposeAsync().OrTimeout();
                    await connection.DisposeAsync().OrTimeout();
                }
            }

            [Fact]
            public async Task InvalidHandshakeResponseCausesStartToFail()
            {
                using (StartVerifiableLog())
                {
                    var connection = new TestConnection(autoHandshake: false);
                    var hubConnection = CreateHubConnection(connection);
                    try
                    {
                        // We can't await StartAsync because it depends on the negotiate process!
                        var startTask = hubConnection.StartAsync();

                        await connection.ReadSentTextMessageAsync().OrTimeout();

                        // The client expects the first message to be a handshake response, but a handshake response doesn't have a "type".
                        await connection.ReceiveJsonMessage(new { type = "foo" }).OrTimeout();

                        var ex = await Assert.ThrowsAsync<InvalidDataException>(() => startTask).OrTimeout();

                        Assert.Equal("Expected a handshake response from the server.", ex.Message);
                    }
                    finally
                    {
                        await hubConnection.DisposeAsync().OrTimeout();
                        await connection.DisposeAsync().OrTimeout();
                    }
                }
            }

            [Fact]
            public async Task ClientIsOkayReceivingMinorVersionInHandshake()
            {
                // We're just testing that the client doesn't fail when a minor version is added to the handshake
                // The client doesn't actually use that version anywhere yet so there's nothing else to test at this time

                var connection = new TestConnection(autoHandshake: false);
                var hubConnection = CreateHubConnection(connection);
                try
                {
                    var startTask = hubConnection.StartAsync();
                    var message = await connection.ReadHandshakeAndSendResponseAsync(56).OrTimeout();

                    await startTask.OrTimeout();
                }
                finally
                {
                    await hubConnection.DisposeAsync().OrTimeout();
                    await connection.DisposeAsync().OrTimeout();
                }
            }

            [Fact]
            public async Task InvokeSendsAnInvocationMessage()
            {
                var connection = new TestConnection();
                var hubConnection = CreateHubConnection(connection);
                try
                {
                    await hubConnection.StartAsync().OrTimeout();

                    var invokeTask = hubConnection.InvokeAsync("Foo");

                    var invokeMessage = await connection.ReadSentTextMessageAsync().OrTimeout();

                    // ReadSentTextMessageAsync strips off the record separator (because it has use it as a separator now that we use Pipelines)
                    Assert.Equal("{\"type\":1,\"invocationId\":\"1\",\"target\":\"Foo\",\"arguments\":[]}", invokeMessage);

                    Assert.Equal(TaskStatus.WaitingForActivation, invokeTask.Status);
                }
                finally
                {
                    await hubConnection.DisposeAsync().OrTimeout();
                    await connection.DisposeAsync().OrTimeout();
                }
            }

            [Fact]
            public async Task ReceiveCloseMessageWithoutErrorWillCloseHubConnection()
            {
                var closedTcs = new TaskCompletionSource<Exception>();

                var connection = new TestConnection();
                var hubConnection = CreateHubConnection(connection);
                hubConnection.Closed += e =>
                {
                    closedTcs.SetResult(e);
                    return Task.CompletedTask;
                };

                try
                {
                    await hubConnection.StartAsync().OrTimeout();

                    await connection.ReceiveJsonMessage(new { type = 7 }).OrTimeout();

                    var closeException = await closedTcs.Task.OrTimeout();
                    Assert.Null(closeException);
                }
                finally
                {
                    await hubConnection.DisposeAsync().OrTimeout();
                    await connection.DisposeAsync().OrTimeout();
                }
            }

		[Test]
		[ExpectedException (typeof (ArgumentNullException))]
		public void Arg1Null ()
		{
			Expression.ExclusiveOr (null, Expression.Constant (1));
		}

		[Test]
		[ExpectedException (typeof (ArgumentNullException))]
		public void Arg2Null ()
		{
			Expression.ExclusiveOr (Expression.Constant (1), null);
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void NoOperatorClass ()
		{
			Expression.ExclusiveOr (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void ArgTypesDifferent ()
		{
			Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (true));
		}

		[Test]
		[ExpectedException (typeof (InvalidOperationException))]
		public void Double ()
		{
			Expression.ExclusiveOr (Expression.Constant (1.0), Expression.Constant (2.0));
		}

		[Test]
		public void Integer ()
		{
			BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (2));
			Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#01");
			Assert.AreEqual (typeof (int), expr.Type, "ExclusiveOr#02");
			Assert.IsNull (expr.Method, "ExclusiveOr#03");
			Assert.AreEqual ("(1 ^ 2)", expr.ToString(), "ExclusiveOr#04");
		}

using System;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Core.Domain.Seo;
using Nop.Core.Domain.Stores;

namespace Nop.Core.Domain.Catalog
{
    /// <summary>
    /// Represents a product
    /// </summary>
    public partial class Product : BaseEntity, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported, IDiscountSupported<DiscountProductMapping>, ISoftDeletedEntity
    {
        /// <summary>
        /// Gets or sets the product type identifier
        /// </summary>
        public int ProductTypeId { get; set; }

        /// <summary>
        /// Gets or sets the parent product identifier. It's used to identify associated products (only with "grouped" products)
        /// </summary>
        public int ParentGroupedProductId { get; set; }

        /// <summary>
        /// Gets or sets the values indicating whether this product is visible in catalog or search results.
        /// It's used when this product is associated to some "grouped" one
        /// This way associated products could be accessed/added/etc only from a grouped product details page
        /// </summary>
        public bool VisibleIndividually { get; set; }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the short description
        /// </summary>
        public string ShortDescription { get; set; }

        /// <summary>
        /// Gets or sets the full description
        /// </summary>
        public string FullDescription { get; set; }

        /// <summary>
        /// Gets or sets the admin comment
        /// </summary>
        public string AdminComment { get; set; }

        /// <summary>
        /// Gets or sets a value of used product template identifier
        /// </summary>
        public int ProductTemplateId { get; set; }

        /// <summary>
        /// Gets or sets a vendor identifier
        /// </summary>
        public int VendorId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to show the product on home page
        /// </summary>
        public bool ShowOnHomepage { get; set; }

        /// <summary>
        /// Gets or sets the meta keywords
        /// </summary>
        public string MetaKeywords { get; set; }

        /// <summary>
        /// Gets or sets the meta description
        /// </summary>
        public string MetaDescription { get; set; }

        /// <summary>
        /// Gets or sets the meta title
        /// </summary>
        public string MetaTitle { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product allows customer reviews
        /// </summary>
        public bool AllowCustomerReviews { get; set; }

        /// <summary>
        /// Gets or sets the rating sum (approved reviews)
        /// </summary>
        public int ApprovedRatingSum { get; set; }

        /// <summary>
        /// Gets or sets the rating sum (not approved reviews)
        /// </summary>
        public int NotApprovedRatingSum { get; set; }

        /// <summary>
        /// Gets or sets the total rating votes (approved reviews)
        /// </summary>
        public int ApprovedTotalReviews { get; set; }

        /// <summary>
        /// Gets or sets the total rating votes (not approved reviews)
        /// </summary>
        public int NotApprovedTotalReviews { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is subject to ACL
        /// </summary>
        public bool SubjectToAcl { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores
        /// </summary>
        public bool LimitedToStores { get; set; }

        /// <summary>
        /// Gets or sets the SKU
        /// </summary>
        public string Sku { get; set; }

        /// <summary>
        /// Gets or sets the manufacturer part number
        /// </summary>
        public string ManufacturerPartNumber { get; set; }

        /// <summary>
        /// Gets or sets the Global Trade Item Number (GTIN). These identifiers include UPC (in North America), EAN (in Europe), JAN (in Japan), and ISBN (for books).
        /// </summary>
        public string Gtin { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is gift card
        /// </summary>
        public bool IsGiftCard { get; set; }

        /// <summary>
        /// Gets or sets the gift card type identifier
        /// </summary>
        public int GiftCardTypeId { get; set; }

        /// <summary>
        /// Gets or sets gift card amount that can be used after purchase. If not specified, then product price will be used.
        /// </summary>
        public decimal? OverriddenGiftCardAmount { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product requires that other products are added to the cart (Product X requires Product Y)
        /// </summary>
        public bool RequireOtherProducts { get; set; }

        /// <summary>
        /// Gets or sets a required product identifiers (comma separated)
        /// </summary>
        public string RequiredProductIds { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether required products are automatically added to the cart
        /// </summary>
        public bool AutomaticallyAddRequiredProducts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is download
        /// </summary>
        public bool IsDownload { get; set; }

        /// <summary>
        /// Gets or sets the download identifier
        /// </summary>
        public int DownloadId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this downloadable product can be downloaded unlimited number of times
        /// </summary>
        public bool UnlimitedDownloads { get; set; }

        /// <summary>
        /// Gets or sets the maximum number of downloads
        /// </summary>
        public int MaxNumberOfDownloads { get; set; }

        /// <summary>
        /// Gets or sets the number of days during customers keeps access to the file.
        /// </summary>
        public int? DownloadExpirationDays { get; set; }

        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public int DownloadActivationTypeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product has a sample download file
        /// </summary>
        public bool HasSampleDownload { get; set; }

        /// <summary>
        /// Gets or sets the sample download identifier
        /// </summary>
        public int SampleDownloadId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product has user agreement
        /// </summary>
        public bool HasUserAgreement { get; set; }

        /// <summary>
        /// Gets or sets the text of license agreement
        /// </summary>
        public string UserAgreementText { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is recurring
        /// </summary>
        public bool IsRecurring { get; set; }

        /// <summary>
        /// Gets or sets the cycle length
        /// </summary>
        public int RecurringCycleLength { get; set; }

        /// <summary>
        /// Gets or sets the cycle period
        /// </summary>
        public int RecurringCyclePeriodId { get; set; }

        /// <summary>
        /// Gets or sets the total cycles
        /// </summary>
        public int RecurringTotalCycles { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is rental
        /// </summary>
        public bool IsRental { get; set; }

        /// <summary>
        /// Gets or sets the rental length for some period (price for this period)
        /// </summary>
        public int RentalPriceLength { get; set; }

        /// <summary>
        /// Gets or sets the rental period (price for this period)
        /// </summary>
        public int RentalPricePeriodId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is ship enabled
        /// </summary>
        public bool IsShipEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is free shipping
        /// </summary>
        public bool IsFreeShipping { get; set; }

        /// <summary>
        /// Gets or sets a value this product should be shipped separately (each item)
        /// </summary>
        public bool ShipSeparately { get; set; }

        /// <summary>
        /// Gets or sets the additional shipping charge
        /// </summary>
        public decimal AdditionalShippingCharge { get; set; }

        /// <summary>
        /// Gets or sets a delivery date identifier
        /// </summary>
        public int DeliveryDateId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is marked as tax exempt
        /// </summary>
        public bool IsTaxExempt { get; set; }

        /// <summary>
        /// Gets or sets the tax category identifier
        /// </summary>
        public int TaxCategoryId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is telecommunications or broadcasting or electronic services
        /// </summary>
        public bool IsTelecommunicationsOrBroadcastingOrElectronicServices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating how to manage inventory
        /// </summary>
        public int ManageInventoryMethodId { get; set; }

        /// <summary>
        /// Gets or sets a product availability range identifier
        /// </summary>
        public int ProductAvailabilityRangeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether multiple warehouses are used for this product
        /// </summary>
        public bool UseMultipleWarehouses { get; set; }

        /// <summary>
        /// Gets or sets a warehouse identifier
        /// </summary>
        public int WarehouseId { get; set; }

        /// <summary>
        /// Gets or sets the stock quantity
        /// </summary>
        public int StockQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to display stock availability
        /// </summary>
        public bool DisplayStockAvailability { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to display stock quantity
        /// </summary>
        public bool DisplayStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets the minimum stock quantity
        /// </summary>
        public int MinStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets the low stock activity identifier
        /// </summary>
        public int LowStockActivityId { get; set; }

        /// <summary>
        /// Gets or sets the quantity when admin should be notified
        /// </summary>
        public int NotifyAdminForQuantityBelow { get; set; }

        /// <summary>
        /// Gets or sets a value backorder mode identifier
        /// </summary>
        public int BackorderModeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to back in stock subscriptions are allowed
        /// </summary>
        public bool AllowBackInStockSubscriptions { get; set; }

        /// <summary>
        /// Gets or sets the order minimum quantity
        /// </summary>
        public int OrderMinimumQuantity { get; set; }

        /// <summary>
        /// Gets or sets the order maximum quantity
        /// </summary>
        public int OrderMaximumQuantity { get; set; }

        /// <summary>
        /// Gets or sets the comma separated list of allowed quantities. null or empty if any quantity is allowed
        /// </summary>
        public string AllowedQuantities { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether we allow adding to the cart/wishlist only attribute combinations that exist and have stock greater than zero.
        /// This option is used only when we have "manage inventory" set to "track inventory by product attributes"
        /// </summary>
        public bool AllowAddingOnlyExistingAttributeCombinations { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product is returnable (a customer is allowed to submit return request with this product)
        /// </summary>
        public bool NotReturnable { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable buy (Add to cart) button
        /// </summary>
        public bool DisableBuyButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable "Add to wishlist" button
        /// </summary>
        public bool DisableWishlistButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this item is available for Pre-Order
        /// </summary>
        public bool AvailableForPreOrder { get; set; }

        /// <summary>
        /// Gets or sets the start date and time of the product availability (for pre-order products)
        /// </summary>
        public DateTime? PreOrderAvailabilityStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to show "Call for Pricing" or "Call for quote" instead of price
        /// </summary>
        public bool CallForPrice { get; set; }

        /// <summary>
        /// Gets or sets the price
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// Gets or sets the old price
        /// </summary>
        public decimal OldPrice { get; set; }

        /// <summary>
        /// Gets or sets the product cost
        /// </summary>
        public decimal ProductCost { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether a customer enters price
        /// </summary>
        public bool CustomerEntersPrice { get; set; }

        /// <summary>
        /// Gets or sets the minimum price entered by a customer
        /// </summary>
        public decimal MinimumCustomerEnteredPrice { get; set; }

        /// <summary>
        /// Gets or sets the maximum price entered by a customer
        /// </summary>
        public decimal MaximumCustomerEnteredPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether base price (PAngV) is enabled. Used by German users.
        /// </summary>
        public bool BasepriceEnabled { get; set; }

        /// <summary>
        /// Gets or sets an amount in product for PAngV
        /// </summary>
        public decimal BasepriceAmount { get; set; }

        /// <summary>
        /// Gets or sets a unit of product for PAngV (MeasureWeight entity)
        /// </summary>
        public int BasepriceUnitId { get; set; }

        /// <summary>
        /// Gets or sets a reference amount for PAngV
        /// </summary>
        public decimal BasepriceBaseAmount { get; set; }

        /// <summary>
        /// Gets or sets a reference unit for PAngV (MeasureWeight entity)
        /// </summary>
        public int BasepriceBaseUnitId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product is marked as new
        /// </summary>
        public bool MarkAsNew { get; set; }

        /// <summary>
        /// Gets or sets the start date and time of the new product (set product as "New" from date). Leave empty to ignore this property
        /// </summary>
        public DateTime? MarkAsNewStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the end date and time of the new product (set product as "New" to date). Leave empty to ignore this property
        /// </summary>
        public DateTime? MarkAsNewEndDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product has tier prices configured
        /// <remarks>The same as if we run TierPrices.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load tier prices navigation property
        /// </remarks>
        /// </summary>
        public bool HasTierPrices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product has discounts applied
        /// <remarks>The same as if we run AppliedDiscounts.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load Applied Discounts navigation property
        /// </remarks>
        /// </summary>
        public bool HasDiscountsApplied { get; set; }

        /// <summary>
        /// Gets or sets the weight
        /// </summary>
        public decimal Weight { get; set; }

        /// <summary>
        /// Gets or sets the length
        /// </summary>
        public decimal Length { get; set; }

        /// <summary>
        /// Gets or sets the width
        /// </summary>
        public decimal Width { get; set; }

        /// <summary>
        /// Gets or sets the height
        /// </summary>
        public decimal Height { get; set; }

        /// <summary>
        /// Gets or sets the available start date and time
        /// </summary>
        public DateTime? AvailableStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the available end date and time
        /// </summary>
        public DateTime? AvailableEndDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a display order.
        /// This value is used when sorting associated products (used with "grouped" products)
        /// This value is used when sorting home page products
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is published
        /// </summary>
        public bool Published { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity has been deleted
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the date and time of product creation
        /// </summary>
        public DateTime CreatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the date and time of product update
        /// </summary>
        public DateTime UpdatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the product type
        /// </summary>
        public ProductType ProductType
        {
            get => (ProductType)ProductTypeId;
            set => ProductTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the backorder mode
        /// </summary>
        public BackorderMode BackorderMode
        {
            get => (BackorderMode)BackorderModeId;
            set => BackorderModeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public DownloadActivationType DownloadActivationType
        {
            get => (DownloadActivationType)DownloadActivationTypeId;
            set => DownloadActivationTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the gift card type
        /// </summary>
        public GiftCardType GiftCardType
        {
            get => (GiftCardType)GiftCardTypeId;
            set => GiftCardTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the low stock activity
        /// </summary>
        public LowStockActivity LowStockActivity
        {
            get => (LowStockActivity)LowStockActivityId;
            set => LowStockActivityId = (int)value;
        }

        /// <summary>
        /// Gets or sets the value indicating how to manage inventory
        /// </summary>
        public ManageInventoryMethod ManageInventoryMethod
        {
            get => (ManageInventoryMethod)ManageInventoryMethodId;
            set => ManageInventoryMethodId = (int)value;
        }

        /// <summary>
        /// Gets or sets the cycle period for recurring products
        /// </summary>
        public RecurringProductCyclePeriod RecurringCyclePeriod
        {
            get => (RecurringProductCyclePeriod)RecurringCyclePeriodId;
            set => RecurringCyclePeriodId = (int)value;
        }

        /// <summary>
        /// Gets or sets the period for rental products
        /// </summary>
        public RentalPricePeriod RentalPricePeriod
        {
            get => (RentalPricePeriod)RentalPricePeriodId;
            set => RentalPricePeriodId = (int)value;
        }
    }
}


        public override bool ToBool(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToBoolean(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? false : throw e;
            }
        }

        public override byte ToByte(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToByte(Value);
            }
            catch (Exception e)
            {
                return (byte)(tryOrDefault ? 0 : throw e);
            }
        }

        public override char ToChar(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToChar(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? '\0' : throw e;
            }
        }

        public override decimal ToDecimal(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDecimal(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override double ToDouble(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDouble(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override float ToFloat(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToSingle(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override bool ToBool(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToBoolean(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? false : throw e;
            }
        }

        public override byte ToByte(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToByte(Value);
            }
            catch (Exception e)
            {
                return (byte)(tryOrDefault ? 0 : throw e);
            }
        }

        public override char ToChar(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToChar(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? '\0' : throw e;
            }
        }

        public override decimal ToDecimal(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDecimal(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override double ToDouble(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDouble(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override float ToFloat(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToSingle(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override bool ToBool(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToBoolean(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? false : throw e;
            }
        }

        public override byte ToByte(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToByte(Value);
            }
            catch (Exception e)
            {
                return (byte)(tryOrDefault ? 0 : throw e);
            }
        }

        public override char ToChar(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToChar(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? '\0' : throw e;
            }
        }

        public override decimal ToDecimal(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDecimal(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override double ToDouble(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToDouble(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

        public override float ToFloat(bool tryOrDefault = false)
        {
            try
            {
                return Convert.ToSingle(Value);
            }
            catch (Exception e)
            {
                return tryOrDefault ? 0 : throw e;
            }
        }

Microsoft.Quantum.Extensions.Bitwise.Or : IApplyData, ICallable

Constructors :

public Or(IOperationFactory m = )

Methods :

public Func<ValueTuple<Int64Int64>, Int64> get___Body__()
public Void __Init__()
public IApplyData __DataIn__(ValueTuple<Int64Int64> data = )
public IApplyData __DataOut__(Int64 data = )
public static Task<Int64> Run(IOperationFactory __m__ = , Int64 a = , Int64 b = )
public Int64 Apply(ValueTuple<Int64Int64> a = )
public T Partial(Object partialInfo = )
public FunctionPartial<P, ValueTuple<Int64Int64>, Int64> Partial(Func<P, ValueTuple<Int64Int64>> mapper = )
public GenO Apply(Object args = )
public String ToString()
public String __qsharpType()
public IOperationFactory get___Factory__()
public RuntimeMetadata GetRuntimeMetadata(IApplyData args = )
public Type GetType()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Other methods

Or

We found 10 examples in language CSharp for this search. You will see 10 fragments of code.
using Asam.Ppc.Domain.CommonModule;

namespace Asam.Ppc.Domain.AssessmentModule.Psychological
{
    public class PsychologicalOrEmotionalProblems : Lookup
    {
        /// <summary>
        ///     None = 0.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ProblemsWontInterfere = new PsychologicalOrEmotionalProblems
            {
                Code = "None",
                SortOrder = 1,
                Value = 0
            };

        /// <summary>
        ///     AnxietyDisorder = 1.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems AnxietyDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "AnxietyDisorder",
                SortOrder = 2,
                Value = 1
            };

        /// <summary>
        ///     PanicDisorder = 2.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems PanicDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "PanicDisorder",
                SortOrder = 3,
                Value = 2
            };

        /// <summary>
        ///     Agoraphobia = 3.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems Agoraphobia = new PsychologicalOrEmotionalProblems
            {
                Code = "Agoraphobia",
                SortOrder = 4,
                Value = 3
            };

        /// <summary>
        ///     PostTraumaticStressDisorder = 4.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems PostTraumaticStressDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "PostTraumaticStressDisorder",
                SortOrder = 5,
                Value = 4
            };

        /// <summary>
        ///     SocialPhobia = 5.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems SocialPhobia = new PsychologicalOrEmotionalProblems
            {
                Code = "SocialPhobia",
                SortOrder = 6,
                Value = 5
            };

        /// <summary>
        ///     ObsessiveCompulsiveDisorder = 6.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ObsessiveCompulsiveDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "ObsessiveCompulsiveDisorder",
                SortOrder = 7,
                Value = 6
            };

        /// <summary>
        ///     EatingDisorder = 7.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems EatingDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "EatingDisorder",
                SortOrder = 8,
                Value = 7
            };

        /// <summary>
        ///     DepressiveDisorder = 8.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems DepressiveDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "DepressiveDisorder",
                SortOrder = 9,
                Value = 8
            };

        /// <summary>
        ///     ManiaOrBipolarDisorder = 9.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems ManiaOrBipolarDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "ManiaOrBipolarDisorder",
                SortOrder = 10,
                Value = 9
            };

        /// <summary>
        ///     SchizophreniaPsychoticOrThoughtDisorder = 10.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems SchizophreniaPsychoticOrThoughtDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "SchizophreniaPsychoticOrThoughtDisorder",
                SortOrder = 11,
                Value = 10
            };

        /// <summary>
        ///     BorderlineParanoidAntisocialOrOtherPersonalityDisorder = 11.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems BorderlineParanoidAntisocialOrOtherPersonalityDisorder = new PsychologicalOrEmotionalProblems
            {
                Code = "BorderlineParanoidAntisocialOrOtherPersonalityDisorder",
                SortOrder = 12,
                Value = 11
            };

        /// <summary>
        ///     Other = 12.
        /// </summary>
        public static readonly PsychologicalOrEmotionalProblems Other = new PsychologicalOrEmotionalProblems
            {
                Code = "Other",
                SortOrder = 13,
                Value = 12
            };
    }
}

/*  Company :       Nequeo Pty Ltd, http://www.nequeo.com.au/
 *  Copyright :     Copyright © Nequeo Pty Ltd 2015 http://www.nequeo.com.au/
 * 
 *  File :          
 *  Purpose :       
 * 
 */

#region Nequeo Pty Ltd License
/*
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nequeo.Net.Maps.Microsoft
{
    /// <summary>
    /// Geocoding model.
    /// </summary>
    public class Geocoding
    {
        /// <summary>
        /// Gets or sets the authentication result code.
        /// </summary>
        public string AuthenticationResultCode { get; set; }

        /// <summary>
        /// Gets or sets the brand logo uri.
        /// </summary>
        public string BrandLogoUri { get; set; }

        /// <summary>
        /// Gets or sets the copyright.
        /// </summary>
        public string Copyright { get; set; }

        /// <summary>
        /// Gets or sets the array of resource sets.
        /// </summary>
        public ResourceSet[] ResourceSets { get; set; }

        /// <summary>
        /// Gets or sets the status code.
        /// </summary>
        public int StatusCode { get; set; }

        /// <summary>
        /// Gets or sets the status description.
        /// </summary>
        public string StatusDescription { get; set; }

        /// <summary>
        /// Gets or sets the trace ID.
        /// </summary>
        public string TraceId { get; set; }
    }

    /// <summary>
    /// Resource set model.
    /// </summary>
    public class ResourceSet
    {
        /// <summary>
        /// Gets or sets the estimated total.
        /// </summary>
        public int EstimatedTotal { get; set; }

        /// <summary>
        /// Gets or sets the resource array.
        /// </summary>
        public Resource[] Resources { get; set; }
    }

    /// <summary>
    /// Resource model.
    /// </summary>
    public class Resource
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string __type { get; set; }

        /// <summary>
        /// Gets or sets the b-box.
        /// </summary>
        public double[] Bbox { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the point.
        /// </summary>
        public Point Point { get; set; }

        /// <summary>
        /// Gets or sets the address.
        /// </summary>
        public Address Address { get; set; }

        /// <summary>
        /// Gets or sets the confidence.
        /// </summary>
        public string Confidence { get; set; }

        /// <summary>
        /// Gets or sets the entity type.
        /// </summary>
        public string EntityType { get; set; }

        /// <summary>
        /// Gets or sets the geocode points.
        /// </summary>
        public GeocodePoint[] GeocodePoints { get; set; }

        /// <summary>
        /// Gets or sets the match codes.
        /// </summary>
        public string[] MatchCodes { get; set; }
    }

    /// <summary>
    /// Point model.
    /// </summary>
    public class Point
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the coordinates.
        /// </summary>
        public double[] Coordinates { get; set; }
    }

    /// <summary>
    /// Address model.
    /// </summary>
    public class Address
    {
        /// <summary>
        /// Gets or sets the address.
        /// </summary>
        public string AddressLine { get; set; }

        /// <summary>
        /// Gets or sets the district.
        /// </summary>
        public string AdminDistrict { get; set; }

        /// <summary>
        /// Gets or sets the district.
        /// </summary>
        public string AdminDistrict2 { get; set; }

        /// <summary>
        /// Gets or sets the country region.
        /// </summary>
        public string CountryRegion { get; set; }

        /// <summary>
        /// Gets or sets the formatted address.
        /// </summary>
        public string FormattedAddress { get; set; }

        /// <summary>
        /// Gets or sets the locality.
        /// </summary>
        public string Locality { get; set; }

        /// <summary>
        /// Gets or sets the neighborhood.
        /// </summary>
        public string Neighborhood { get; set; }

        /// <summary>
        /// Gets or sets the landmark.
        /// </summary>
        public string Landmark { get; set; }

        /// <summary>
        /// Gets or sets the postal code.
        /// </summary>
        public string PostalCode { get; set; }
    }

    /// <summary>
    /// Geocode point model.
    /// </summary>
    public class GeocodePoint
    {
        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the coordinates.
        /// </summary>
        public double[] Coordinates { get; set; }

        /// <summary>
        /// Gets or sets the calculation method.
        /// </summary>
        public string CalculationMethod { get; set; }

        /// <summary>
        /// Gets or sets the usage types.
        /// </summary>
        public string[] UsageTypes { get; set; }
    }
}

using Asam.Ppc.Domain.CommonModule;

namespace Asam.Ppc.Domain.AssessmentModule.DrugAndAlcohol.Lookups
{
    /// <summary>
    /// Head Ache or Fullness Severity
    /// </summary>
    public class HeadAcheOrFullnessSeverity : Lookup
    {
        /// <summary>
        ///     NotPresent = 0.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity NotPresent = new HeadAcheOrFullnessSeverity
            {
                Code = "NotPresent",
                SortOrder = 1,
                Value = 0
            };

        /// <summary>
        ///     VeryMild = 1.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity VeryMild = new HeadAcheOrFullnessSeverity
            {
                Code = "VeryMild",
                SortOrder = 2,
                Value = 1
            };

        /// <summary>
        ///     Mild = 2.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity Mild = new HeadAcheOrFullnessSeverity
            {
                Code = "Mild",
                SortOrder = 3,
                Value = 2
            };

        /// <summary>
        ///     Moderate = 3.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity Moderate = new HeadAcheOrFullnessSeverity
            {
                Code = "Moderate",
                SortOrder = 4,
                Value = 3
            };

        /// <summary>
        ///     ModeratelySevere = 4.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity ModeratelySevere = new HeadAcheOrFullnessSeverity
            {
                Code = "ModeratelySevere",
                SortOrder = 5,
                Value = 4
            };

        /// <summary>
        ///     Severe = 5.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity Severe = new HeadAcheOrFullnessSeverity
            {
                Code = "Severe",
                SortOrder = 6,
                Value = 5
            };

        /// <summary>
        ///     VerySevere = 6.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity VerySevere = new HeadAcheOrFullnessSeverity
            {
                Code = "VerySevere",
                SortOrder = 7,
                Value = 6
            };

        /// <summary>
        ///     ExtremelySevere = 7.
        /// </summary>
        public static readonly HeadAcheOrFullnessSeverity ExtremelySevere = new HeadAcheOrFullnessSeverity
            {
                Code = "ExtremelySevere",
                SortOrder = 8,
                Value = 7
            };
    }
}

/*  Company :       Nequeo Pty Ltd, http://www.nequeo.com.au/
 *  Copyright :     Copyright © Nequeo Pty Ltd 2010 http://www.nequeo.com.au/
 * 
 *  File :          
 *  Purpose :       
 * 
 */

#region Nequeo Pty Ltd License
/*
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nequeo.Model
{
    /// <summary>
    /// File details.
    /// </summary>
    [DataContract]
    [Serializable()]
    public class FileDetails
    {
        /// <summary>
        /// Gets or sets the name of the file.
        /// </summary>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the size, in bytes, of the current file.
        /// </summary>
        [DataMember]
        public long Length { get; set; }

        /// <summary>
        /// Gets or sets the attributes.
        /// </summary>
        [DataMember]
        public System.IO.FileAttributes Attributes { get; set; }

        /// <summary>
        /// Gets or sets the creation time of the current file or directory.
        /// </summary>
        [DataMember]
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.
        /// </summary>
        [DataMember]
        public DateTime CreationTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the file or directory exists.
        /// </summary>
        [DataMember]
        public bool Exists { get; set; }

        /// <summary>
        /// Gets or sets a value that determines if the current file is read only.
        /// </summary>
        [DataMember]
        public bool IsReadOnly { get; set; }

        /// <summary>
        /// Gets or sets the string representing the extension part of the file.
        /// </summary>
        [DataMember]
        public string Extension { get; set; }

        /// <summary>
        /// Gets or sets the full path of the directory or file.
        /// </summary>
        [DataMember]
        public string FullName { get; set; }

        /// <summary>
        /// Gets or sets an instance of the parent directory.
        /// </summary>
        [DataMember]
        public string Directory { get; set; }

        /// <summary>
        /// Gets or sets a string representing the directory's full path.
        /// </summary>
        [DataMember]
        public string DirectoryName { get; set; }

        /// <summary>
        /// Gets or sets the time the current file or directory was last accessed.
        /// </summary>
        [DataMember]
        public DateTime LastAccessTime { get; set; }

        /// <summary>
        /// Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.
        /// </summary>
        [DataMember]
        public DateTime LastAccessTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the time when the current file or directory was last written to.
        /// </summary>
        [DataMember]
        public DateTime LastWriteTime { get; set; }

        /// <summary>
        /// Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.
        /// </summary>
        [DataMember]
        public DateTime LastWriteTimeUtc { get; set; }
    }
}

/*  Company :       Nequeo Pty Ltd, http://www.nequeo.com.au/
 *  Copyright :     Copyright © Nequeo Pty Ltd 2010 http://www.nequeo.com.au/
 * 
 *  File :          
 *  Purpose :       
 * 
 */

#region Nequeo Pty Ltd License
/*
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nequeo.Model
{
    /// <summary>
    /// File details.
    /// </summary>
    [DataContract]
    [Serializable()]
    public class FileDetails
    {
        /// <summary>
        /// Gets or sets the name of the file.
        /// </summary>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the size, in bytes, of the current file.
        /// </summary>
        [DataMember]
        public long Length { get; set; }

        /// <summary>
        /// Gets or sets the attributes.
        /// </summary>
        [DataMember]
        public System.IO.FileAttributes Attributes { get; set; }

        /// <summary>
        /// Gets or sets the creation time of the current file or directory.
        /// </summary>
        [DataMember]
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.
        /// </summary>
        [DataMember]
        public DateTime CreationTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the file or directory exists.
        /// </summary>
        [DataMember]
        public bool Exists { get; set; }

        /// <summary>
        /// Gets or sets a value that determines if the current file is read only.
        /// </summary>
        [DataMember]
        public bool IsReadOnly { get; set; }

        /// <summary>
        /// Gets or sets the string representing the extension part of the file.
        /// </summary>
        [DataMember]
        public string Extension { get; set; }

        /// <summary>
        /// Gets or sets the full path of the directory or file.
        /// </summary>
        [DataMember]
        public string FullName { get; set; }

        /// <summary>
        /// Gets or sets an instance of the parent directory.
        /// </summary>
        [DataMember]
        public string Directory { get; set; }

        /// <summary>
        /// Gets or sets a string representing the directory's full path.
        /// </summary>
        [DataMember]
        public string DirectoryName { get; set; }

        /// <summary>
        /// Gets or sets the time the current file or directory was last accessed.
        /// </summary>
        [DataMember]
        public DateTime LastAccessTime { get; set; }

        /// <summary>
        /// Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.
        /// </summary>
        [DataMember]
        public DateTime LastAccessTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the time when the current file or directory was last written to.
        /// </summary>
        [DataMember]
        public DateTime LastWriteTime { get; set; }

        /// <summary>
        /// Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.
        /// </summary>
        [DataMember]
        public DateTime LastWriteTimeUtc { get; set; }
    }
}

using System;
using System.Collections.Generic;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Payments;
using Nop.Core.Domain.Shipping;
using Nop.Core.Domain.Tax;

namespace Nop.Core.Domain.Orders
{
    /// <summary>
    /// Represents an order
    /// </summary>
    public partial class Order : BaseEntity
    {
        private ICollection<DiscountUsageHistory> _discountUsageHistory;
        private ICollection<GiftCardUsageHistory> _giftCardUsageHistory;
        private ICollection<OrderNote> _orderNotes;
        private ICollection<OrderItem> _orderItems;
        private ICollection<Shipment> _shipments;

        #region Properties

        /// <summary>
        /// Gets or sets the order identifier
        /// </summary>
        public Guid OrderGuid { get; set; }

        /// <summary>
        /// Gets or sets the store identifier
        /// </summary>
        public int StoreId { get; set; }

        /// <summary>
        /// Gets or sets the customer identifier
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// Gets or sets the billing address identifier
        /// </summary>
        public int BillingAddressId { get; set; }

        /// <summary>
        /// Gets or sets the shipping address identifier
        /// </summary>
        public int? ShippingAddressId { get; set; }

        /// <summary>
        /// Gets or sets the pickup address identifier
        /// </summary>
        public int? PickupAddressId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether a customer chose "pick up in store" shipping option
        /// </summary>
        public bool PickUpInStore { get; set; }

        /// <summary>
        /// Gets or sets an order status identifier
        /// </summary>
        public int OrderStatusId { get; set; }

        /// <summary>
        /// Gets or sets the shipping status identifier
        /// </summary>
        public int ShippingStatusId { get; set; }

        /// <summary>
        /// Gets or sets the payment status identifier
        /// </summary>
        public int PaymentStatusId { get; set; }

        /// <summary>
        /// Gets or sets the payment method system name
        /// </summary>
        public string PaymentMethodSystemName { get; set; }

        /// <summary>
        /// Gets or sets the customer currency code (at the moment of order placing)
        /// </summary>
        public string CustomerCurrencyCode { get; set; }

        /// <summary>
        /// Gets or sets the currency rate
        /// </summary>
        public decimal CurrencyRate { get; set; }

        /// <summary>
        /// Gets or sets the customer tax display type identifier
        /// </summary>
        public int CustomerTaxDisplayTypeId { get; set; }

        /// <summary>
        /// Gets or sets the VAT number (the European Union Value Added Tax)
        /// </summary>
        public string VatNumber { get; set; }

        /// <summary>
        /// Gets or sets the order subtotal (include tax)
        /// </summary>
        public decimal OrderSubtotalInclTax { get; set; }

        /// <summary>
        /// Gets or sets the order subtotal (exclude tax)
        /// </summary>
        public decimal OrderSubtotalExclTax { get; set; }

        /// <summary>
        /// Gets or sets the order subtotal discount (include tax)
        /// </summary>
        public decimal OrderSubTotalDiscountInclTax { get; set; }

        /// <summary>
        /// Gets or sets the order subtotal discount (exclude tax)
        /// </summary>
        public decimal OrderSubTotalDiscountExclTax { get; set; }

        /// <summary>
        /// Gets or sets the order shipping (include tax)
        /// </summary>
        public decimal OrderShippingInclTax { get; set; }

        /// <summary>
        /// Gets or sets the order shipping (exclude tax)
        /// </summary>
        public decimal OrderShippingExclTax { get; set; }

        /// <summary>
        /// Gets or sets the payment method additional fee (incl tax)
        /// </summary>
        public decimal PaymentMethodAdditionalFeeInclTax { get; set; }

        /// <summary>
        /// Gets or sets the payment method additional fee (exclude tax)
        /// </summary>
        public decimal PaymentMethodAdditionalFeeExclTax { get; set; }

        /// <summary>
        /// Gets or sets the tax rates
        /// </summary>
        public string TaxRates { get; set; }

        /// <summary>
        /// Gets or sets the order tax
        /// </summary>
        public decimal OrderTax { get; set; }

        /// <summary>
        /// Gets or sets the order discount (applied to order total)
        /// </summary>
        public decimal OrderDiscount { get; set; }

        /// <summary>
        /// Gets or sets the order total
        /// </summary>
        public decimal OrderTotal { get; set; }

        /// <summary>
        /// Gets or sets the refunded amount
        /// </summary>
        public decimal RefundedAmount { get; set; }

        /// <summary>
        /// Gets or sets the reward points history entry identifier when reward points were earned (gained) for placing this order
        /// </summary>
        public int? RewardPointsHistoryEntryId { get; set; }

        /// <summary>
        /// Gets or sets the checkout attribute description
        /// </summary>
        public string CheckoutAttributeDescription { get; set; }

        /// <summary>
        /// Gets or sets the checkout attributes in XML format
        /// </summary>
        public string CheckoutAttributesXml { get; set; }

        /// <summary>
        /// Gets or sets the customer language identifier
        /// </summary>
        public int CustomerLanguageId { get; set; }

        /// <summary>
        /// Gets or sets the affiliate identifier
        /// </summary>
        public int AffiliateId { get; set; }

        /// <summary>
        /// Gets or sets the customer IP address
        /// </summary>
        public string CustomerIp { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether storing of credit card number is allowed
        /// </summary>
        public bool AllowStoringCreditCardNumber { get; set; }

        /// <summary>
        /// Gets or sets the card type
        /// </summary>
        public string CardType { get; set; }

        /// <summary>
        /// Gets or sets the card name
        /// </summary>
        public string CardName { get; set; }

        /// <summary>
        /// Gets or sets the card number
        /// </summary>
        public string CardNumber { get; set; }

        /// <summary>
        /// Gets or sets the masked credit card number
        /// </summary>
        public string MaskedCreditCardNumber { get; set; }

        /// <summary>
        /// Gets or sets the card CVV2
        /// </summary>
        public string CardCvv2 { get; set; }

        /// <summary>
        /// Gets or sets the card expiration month
        /// </summary>
        public string CardExpirationMonth { get; set; }

        /// <summary>
        /// Gets or sets the card expiration year
        /// </summary>
        public string CardExpirationYear { get; set; }

        /// <summary>
        /// Gets or sets the authorization transaction identifier
        /// </summary>
        public string AuthorizationTransactionId { get; set; }

        /// <summary>
        /// Gets or sets the authorization transaction code
        /// </summary>
        public string AuthorizationTransactionCode { get; set; }

        /// <summary>
        /// Gets or sets the authorization transaction result
        /// </summary>
        public string AuthorizationTransactionResult { get; set; }

        /// <summary>
        /// Gets or sets the capture transaction identifier
        /// </summary>
        public string CaptureTransactionId { get; set; }

        /// <summary>
        /// Gets or sets the capture transaction result
        /// </summary>
        public string CaptureTransactionResult { get; set; }

        /// <summary>
        /// Gets or sets the subscription transaction identifier
        /// </summary>
        public string SubscriptionTransactionId { get; set; }

        /// <summary>
        /// Gets or sets the paid date and time
        /// </summary>
        public DateTime? PaidDateUtc { get; set; }

        /// <summary>
        /// Gets or sets the shipping method
        /// </summary>
        public string ShippingMethod { get; set; }

        /// <summary>
        /// Gets or sets the shipping rate computation method identifier or the pickup point provider identifier (if PickUpInStore is true)
        /// </summary>
        public string ShippingRateComputationMethodSystemName { get; set; }

        /// <summary>
        /// Gets or sets the serialized CustomValues (values from ProcessPaymentRequest)
        /// </summary>
        public string CustomValuesXml { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity has been deleted
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the date and time of order creation
        /// </summary>
        public DateTime CreatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the custom order number without prefix
        /// </summary>
        public string CustomOrderNumber { get; set; }

        #endregion

        #region Navigation properties

        /// <summary>
        /// Gets or sets the customer
        /// </summary>
        public virtual Customer Customer { get; set; }

        /// <summary>
        /// Gets or sets the billing address
        /// </summary>
        public virtual Address BillingAddress { get; set; }

        /// <summary>
        /// Gets or sets the shipping address
        /// </summary>
        public virtual Address ShippingAddress { get; set; }

        /// <summary>
        /// Gets or sets the pickup address
        /// </summary>
        public virtual Address PickupAddress { get; set; }

        /// <summary>
        /// Gets or sets the reward points history record (spent by a customer when placing this order)
        /// </summary>
        public virtual RewardPointsHistory RedeemedRewardPointsEntry { get; set; }

        /// <summary>
        /// Gets or sets discount usage history
        /// </summary>
        public virtual ICollection<DiscountUsageHistory> DiscountUsageHistory
        {
            get => _discountUsageHistory ?? (_discountUsageHistory = new List<DiscountUsageHistory>());
            protected set => _discountUsageHistory = value;
        }

        /// <summary>
        /// Gets or sets gift card usage history (gift card that were used with this order)
        /// </summary>
        public virtual ICollection<GiftCardUsageHistory> GiftCardUsageHistory
        {
            get => _giftCardUsageHistory ?? (_giftCardUsageHistory = new List<GiftCardUsageHistory>());
            protected set => _giftCardUsageHistory = value;
        }

        /// <summary>
        /// Gets or sets order notes
        /// </summary>
        public virtual ICollection<OrderNote> OrderNotes
        {
            get => _orderNotes ?? (_orderNotes = new List<OrderNote>());
            protected set => _orderNotes = value;
        }

        /// <summary>
        /// Gets or sets order items
        /// </summary>
        public virtual ICollection<OrderItem> OrderItems
        {
            get => _orderItems ?? (_orderItems = new List<OrderItem>());
            protected set => _orderItems = value;
        }

        /// <summary>
        /// Gets or sets shipments
        /// </summary>
        public virtual ICollection<Shipment> Shipments
        {
            get => _shipments ?? (_shipments = new List<Shipment>());
            protected set => _shipments = value;
        }

        #endregion

        #region Custom properties

        /// <summary>
        /// Gets or sets the order status
        /// </summary>
        public OrderStatus OrderStatus
        {
            get => (OrderStatus)OrderStatusId;
            set => OrderStatusId = (int)value;
        }

        /// <summary>
        /// Gets or sets the payment status
        /// </summary>
        public PaymentStatus PaymentStatus
        {
            get => (PaymentStatus)PaymentStatusId;
            set => PaymentStatusId = (int)value;
        }

        /// <summary>
        /// Gets or sets the shipping status
        /// </summary>
        public ShippingStatus ShippingStatus
        {
            get => (ShippingStatus)ShippingStatusId;
            set => ShippingStatusId = (int)value;
        }

        /// <summary>
        /// Gets or sets the customer tax display type
        /// </summary>
        public TaxDisplayType CustomerTaxDisplayType
        {
            get => (TaxDisplayType)CustomerTaxDisplayTypeId;
            set => CustomerTaxDisplayTypeId = (int)value;
        }

        #endregion
    }
}

using System;
using System.Collections.Generic;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Core.Domain.Seo;
using Nop.Core.Domain.Stores;

namespace Nop.Core.Domain.Catalog
{
    /// <summary>
    /// Represents a product
    /// </summary>
    public partial class Product : BaseEntity, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported
    {
        private ICollection<ProductCategory> _productCategories;
        private ICollection<ProductManufacturer> _productManufacturers;
        private ICollection<ProductPicture> _productPictures;
        private ICollection<ProductReview> _productReviews;
        private ICollection<ProductSpecificationAttribute> _productSpecificationAttributes;
        private ICollection<ProductTag> _productTags;
        private ICollection<ProductAttributeMapping> _productAttributeMappings;
        private ICollection<ProductAttributeCombination> _productAttributeCombinations;
        private ICollection<TierPrice> _tierPrices;
        private ICollection<Discount> _appliedDiscounts;
        private ICollection<ProductWarehouseInventory> _productWarehouseInventory;


        /// <summary>
        /// Gets or sets the product type identifier
        /// </summary>
        public int ProductTypeId { get; set; }
        /// <summary>
        /// Gets or sets the parent product identifier. It's used to identify associated products (only with "grouped" products)
        /// </summary>
        public int ParentGroupedProductId { get; set; }
        /// <summary>
        /// Gets or sets the values indicating whether this product is visible in catalog or search results.
        /// It's used when this product is associated to some "grouped" one
        /// This way associated products could be accessed/added/etc only from a grouped product details page
        /// </summary>
        public bool VisibleIndividually { get; set; }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the short description
        /// </summary>
        public string ShortDescription { get; set; }
        /// <summary>
        /// Gets or sets the full description
        /// </summary>
        public string FullDescription { get; set; }

        /// <summary>
        /// Gets or sets the admin comment
        /// </summary>
        public string AdminComment { get; set; }

        /// <summary>
        /// Gets or sets a value of used product template identifier
        /// </summary>
        public int ProductTemplateId { get; set; }

        /// <summary>
        /// Gets or sets a vendor identifier
        /// </summary>
        public int VendorId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to show the product on home page
        /// </summary>
        public bool ShowOnHomePage { get; set; }

        /// <summary>
        /// Gets or sets the meta keywords
        /// </summary>
        public string MetaKeywords { get; set; }
        /// <summary>
        /// Gets or sets the meta description
        /// </summary>
        public string MetaDescription { get; set; }
        /// <summary>
        /// Gets or sets the meta title
        /// </summary>
        public string MetaTitle { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product allows customer reviews
        /// </summary>
        public bool AllowCustomerReviews { get; set; }
        /// <summary>
        /// Gets or sets the rating sum (approved reviews)
        /// </summary>
        public int ApprovedRatingSum { get; set; }
        /// <summary>
        /// Gets or sets the rating sum (not approved reviews)
        /// </summary>
        public int NotApprovedRatingSum { get; set; }
        /// <summary>
        /// Gets or sets the total rating votes (approved reviews)
        /// </summary>
        public int ApprovedTotalReviews { get; set; }
        /// <summary>
        /// Gets or sets the total rating votes (not approved reviews)
        /// </summary>
        public int NotApprovedTotalReviews { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is subject to ACL
        /// </summary>
        public bool SubjectToAcl { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores
        /// </summary>
        public bool LimitedToStores { get; set; }

        /// <summary>
        /// Gets or sets the SKU
        /// </summary>
        public string Sku { get; set; }
        /// <summary>
        /// Gets or sets the manufacturer part number
        /// </summary>
        public string ManufacturerPartNumber { get; set; }
        /// <summary>
        /// Gets or sets the Global Trade Item Number (GTIN). These identifiers include UPC (in North America), EAN (in Europe), JAN (in Japan), and ISBN (for books).
        /// </summary>
        public string Gtin { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is gift card
        /// </summary>
        public bool IsGiftCard { get; set; }
        /// <summary>
        /// Gets or sets the gift card type identifier
        /// </summary>
        public int GiftCardTypeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product requires that other products are added to the cart (Product X requires Product Y)
        /// </summary>
        public bool RequireOtherProducts { get; set; }
        /// <summary>
        /// Gets or sets a required product identifiers (comma separated)
        /// </summary>
        public string RequiredProductIds { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether required products are automatically added to the cart
        /// </summary>
        public bool AutomaticallyAddRequiredProducts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is download
        /// </summary>
        public bool IsDownload { get; set; }
        /// <summary>
        /// Gets or sets the download identifier
        /// </summary>
        public int DownloadId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this downloadable product can be downloaded unlimited number of times
        /// </summary>
        public bool UnlimitedDownloads { get; set; }
        /// <summary>
        /// Gets or sets the maximum number of downloads
        /// </summary>
        public int MaxNumberOfDownloads { get; set; }
        /// <summary>
        /// Gets or sets the number of days during customers keeps access to the file.
        /// </summary>
        public int? DownloadExpirationDays { get; set; }
        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public int DownloadActivationTypeId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the product has a sample download file
        /// </summary>
        public bool HasSampleDownload { get; set; }
        /// <summary>
        /// Gets or sets the sample download identifier
        /// </summary>
        public int SampleDownloadId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the product has user agreement
        /// </summary>
        public bool HasUserAgreement { get; set; }
        /// <summary>
        /// Gets or sets the text of license agreement
        /// </summary>
        public string UserAgreementText { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is recurring
        /// </summary>
        public bool IsRecurring { get; set; }
        /// <summary>
        /// Gets or sets the cycle length
        /// </summary>
        public int RecurringCycleLength { get; set; }
        /// <summary>
        /// Gets or sets the cycle period
        /// </summary>
        public int RecurringCyclePeriodId { get; set; }
        /// <summary>
        /// Gets or sets the total cycles
        /// </summary>
        public int RecurringTotalCycles { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is rental
        /// </summary>
        public bool IsRental { get; set; }
        /// <summary>
        /// Gets or sets the rental length for some period (price for this period)
        /// </summary>
        public int RentalPriceLength { get; set; }
        /// <summary>
        /// Gets or sets the rental period (price for this period)
        /// </summary>
        public int RentalPricePeriodId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is ship enabled
        /// </summary>
        public bool IsShipEnabled { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the entity is free shipping
        /// </summary>
        public bool IsFreeShipping { get; set; }
        /// <summary>
        /// Gets or sets a value this product should be shipped separately (each item)
        /// </summary>
        public bool ShipSeparately { get; set; }
        /// <summary>
        /// Gets or sets the additional shipping charge
        /// </summary>
        public decimal AdditionalShippingCharge { get; set; }
        /// <summary>
        /// Gets or sets a delivery date identifier
        /// </summary>
        public int DeliveryDateId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is marked as tax exempt
        /// </summary>
        public bool IsTaxExempt { get; set; }
        /// <summary>
        /// Gets or sets the tax category identifier
        /// </summary>
        public int TaxCategoryId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the product is telecommunications or broadcasting or electronic services
        /// </summary>
        public bool IsTelecommunicationsOrBroadcastingOrElectronicServices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating how to manage inventory
        /// </summary>
        public int ManageInventoryMethodId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether multiple warehouses are used for this product
        /// </summary>
        public bool UseMultipleWarehouses { get; set; }
        /// <summary>
        /// Gets or sets a warehouse identifier
        /// </summary>
        public int WarehouseId { get; set; }
        /// <summary>
        /// Gets or sets the stock quantity
        /// </summary>
        public int StockQuantity { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to display stock availability
        /// </summary>
        public bool DisplayStockAvailability { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to display stock quantity
        /// </summary>
        public bool DisplayStockQuantity { get; set; }
        /// <summary>
        /// Gets or sets the minimum stock quantity
        /// </summary>
        public int MinStockQuantity { get; set; }
        /// <summary>
        /// Gets or sets the low stock activity identifier
        /// </summary>
        public int LowStockActivityId { get; set; }
        /// <summary>
        /// Gets or sets the quantity when admin should be notified
        /// </summary>
        public int NotifyAdminForQuantityBelow { get; set; }
        /// <summary>
        /// Gets or sets a value backorder mode identifier
        /// </summary>
        public int BackorderModeId { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to back in stock subscriptions are allowed
        /// </summary>
        public bool AllowBackInStockSubscriptions { get; set; }
        /// <summary>
        /// Gets or sets the order minimum quantity
        /// </summary>
        public int OrderMinimumQuantity { get; set; }
        /// <summary>
        /// Gets or sets the order maximum quantity
        /// </summary>
        public int OrderMaximumQuantity { get; set; }
        /// <summary>
        /// Gets or sets the comma seperated list of allowed quantities. null or empty if any quantity is allowed
        /// </summary>
        public string AllowedQuantities { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether we allow adding to the cart/wishlist only attribute combinations that exist and have stock greater than zero.
        /// This option is used only when we have "manage inventory" set to "track inventory by product attributes"
        /// </summary>
        public bool AllowAddingOnlyExistingAttributeCombinations { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable buy (Add to cart) button
        /// </summary>
        public bool DisableBuyButton { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to disable "Add to wishlist" button
        /// </summary>
        public bool DisableWishlistButton { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this item is available for Pre-Order
        /// </summary>
        public bool AvailableForPreOrder { get; set; }
        /// <summary>
        /// Gets or sets the start date and time of the product availability (for pre-order products)
        /// </summary>
        public DateTime? PreOrderAvailabilityStartDateTimeUtc { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to show "Call for Pricing" or "Call for quote" instead of price
        /// </summary>
        public bool CallForPrice { get; set; }
        /// <summary>
        /// Gets or sets the price
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// Gets or sets the old price
        /// </summary>
        public decimal OldPrice { get; set; }
        /// <summary>
        /// Gets or sets the product cost
        /// </summary>
        public decimal ProductCost { get; set; }
        /// <summary>
        /// Gets or sets the product special price
        /// </summary>
        public decimal? SpecialPrice { get; set; }
        /// <summary>
        /// Gets or sets the start date and time of the special price
        /// </summary>
        public DateTime? SpecialPriceStartDateTimeUtc { get; set; }
        /// <summary>
        /// Gets or sets the end date and time of the special price
        /// </summary>
        public DateTime? SpecialPriceEndDateTimeUtc { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether a customer enters price
        /// </summary>
        public bool CustomerEntersPrice { get; set; }
        /// <summary>
        /// Gets or sets the minimum price entered by a customer
        /// </summary>
        public decimal MinimumCustomerEnteredPrice { get; set; }
        /// <summary>
        /// Gets or sets the maximum price entered by a customer
        /// </summary>
        public decimal MaximumCustomerEnteredPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product has tier prices configured
        /// <remarks>The same as if we run this.TierPrices.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load tier prices navifation property
        /// </remarks>
        /// </summary>
        public bool HasTierPrices { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this product has discounts applied
        /// <remarks>The same as if we run this.AppliedDiscounts.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load Applied Discounts navifation property
        /// </remarks>
        /// </summary>
        public bool HasDiscountsApplied { get; set; }

        /// <summary>
        /// Gets or sets the weight
        /// </summary>
        public decimal Weight { get; set; }
        /// <summary>
        /// Gets or sets the length
        /// </summary>
        public decimal Length { get; set; }
        /// <summary>
        /// Gets or sets the width
        /// </summary>
        public decimal Width { get; set; }
        /// <summary>
        /// Gets or sets the height
        /// </summary>
        public decimal Height { get; set; }

        /// <summary>
        /// Gets or sets the available start date and time
        /// </summary>
        public DateTime? AvailableStartDateTimeUtc { get; set; }
        /// <summary>
        /// Gets or sets the available end date and time
        /// </summary>
        public DateTime? AvailableEndDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a display order.
        /// This value is used when sorting associated products (used with "grouped" products)
        /// This value is used when sorting home page products
        /// </summary>
        public int DisplayOrder { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the entity is published
        /// </summary>
        public bool Published { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether the entity has been deleted
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the date and time of product creation
        /// </summary>
        public DateTime CreatedOnUtc { get; set; }
        /// <summary>
        /// Gets or sets the date and time of product update
        /// </summary>
        public DateTime UpdatedOnUtc { get; set; }






        /// <summary>
        /// Gets or sets the product type
        /// </summary>
        public ProductType ProductType
        {
            get
            {
                return (ProductType)this.ProductTypeId;
            }
            set
            {
                this.ProductTypeId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the backorder mode
        /// </summary>
        public BackorderMode BackorderMode
        {
            get
            {
                return (BackorderMode)this.BackorderModeId;
            }
            set
            {
                this.BackorderModeId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public DownloadActivationType DownloadActivationType
        {
            get
            {
                return (DownloadActivationType)this.DownloadActivationTypeId;
            }
            set
            {
                this.DownloadActivationTypeId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the gift card type
        /// </summary>
        public GiftCardType GiftCardType
        {
            get
            {
                return (GiftCardType)this.GiftCardTypeId;
            }
            set
            {
                this.GiftCardTypeId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the low stock activity
        /// </summary>
        public LowStockActivity LowStockActivity
        {
            get
            {
                return (LowStockActivity)this.LowStockActivityId;
            }
            set
            {
                this.LowStockActivityId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the value indicating how to manage inventory
        /// </summary>
        public ManageInventoryMethod ManageInventoryMethod
        {
            get
            {
                return (ManageInventoryMethod)this.ManageInventoryMethodId;
            }
            set
            {
                this.ManageInventoryMethodId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the cycle period for recurring products
        /// </summary>
        public RecurringProductCyclePeriod RecurringCyclePeriod
        {
            get
            {
                return (RecurringProductCyclePeriod)this.RecurringCyclePeriodId;
            }
            set
            {
                this.RecurringCyclePeriodId = (int)value;
            }
        }

        /// <summary>
        /// Gets or sets the period for rental products
        /// </summary>
        public RentalPricePeriod RentalPricePeriod
        {
            get
            {
                return (RentalPricePeriod)this.RentalPricePeriodId;
            }
            set
            {
                this.RentalPricePeriodId = (int)value;
            }
        }






        /// <summary>
        /// Gets or sets the collection of ProductCategory
        /// </summary>
        public virtual ICollection<ProductCategory> ProductCategories
        {
            get { return _productCategories ?? (_productCategories = new List<ProductCategory>()); }
            protected set { _productCategories = value; }
        }

        /// <summary>
        /// Gets or sets the collection of ProductManufacturer
        /// </summary>
        public virtual ICollection<ProductManufacturer> ProductManufacturers
        {
            get { return _productManufacturers ?? (_productManufacturers = new List<ProductManufacturer>()); }
            protected set { _productManufacturers = value; }
        }

        /// <summary>
        /// Gets or sets the collection of ProductPicture
        /// </summary>
        public virtual ICollection<ProductPicture> ProductPictures
        {
            get { return _productPictures ?? (_productPictures = new List<ProductPicture>()); }
            protected set { _productPictures = value; }
        }

        /// <summary>
        /// Gets or sets the collection of product reviews
        /// </summary>
        public virtual ICollection<ProductReview> ProductReviews
        {
            get { return _productReviews ?? (_productReviews = new List<ProductReview>()); }
            protected set { _productReviews = value; }
        }

        /// <summary>
        /// Gets or sets the product specification attribute
        /// </summary>
        public virtual ICollection<ProductSpecificationAttribute> ProductSpecificationAttributes
        {
            get { return _productSpecificationAttributes ?? (_productSpecificationAttributes = new List<ProductSpecificationAttribute>()); }
            protected set { _productSpecificationAttributes = value; }
        }

        /// <summary>
        /// Gets or sets the product tags
        /// </summary>
        public virtual ICollection<ProductTag> ProductTags
        {
            get { return _productTags ?? (_productTags = new List<ProductTag>()); }
            protected set { _productTags = value; }
        }

        /// <summary>
        /// Gets or sets the product attribute mappings
        /// </summary>
        public virtual ICollection<ProductAttributeMapping> ProductAttributeMappings
        {
            get { return _productAttributeMappings ?? (_productAttributeMappings = new List<ProductAttributeMapping>()); }
            protected set { _productAttributeMappings = value; }
        }

        /// <summary>
        /// Gets or sets the product attribute combinations
        /// </summary>
        public virtual ICollection<ProductAttributeCombination> ProductAttributeCombinations
        {
            get { return _productAttributeCombinations ?? (_productAttributeCombinations = new List<ProductAttributeCombination>()); }
            protected set { _productAttributeCombinations = value; }
        }

        /// <summary>
        /// Gets or sets the tier prices
        /// </summary>
        public virtual ICollection<TierPrice> TierPrices
        {
            get { return _tierPrices ?? (_tierPrices = new List<TierPrice>()); }
            protected set { _tierPrices = value; }
        }

        /// <summary>
        /// Gets or sets the collection of applied discounts
        /// </summary>
        public virtual ICollection<Discount> AppliedDiscounts
        {
            get { return _appliedDiscounts ?? (_appliedDiscounts = new List<Discount>()); }
            protected set { _appliedDiscounts = value; }
        }
        
        /// <summary>
        /// Gets or sets the collection of "ProductWarehouseInventory" records. We use it only when "UseMultipleWarehouses" is set to "true" and ManageInventoryMethod" to "ManageStock"
        /// </summary>
        public virtual ICollection<ProductWarehouseInventory> ProductWarehouseInventory
        {
            get { return _productWarehouseInventory ?? (_productWarehouseInventory = new List<ProductWarehouseInventory>()); }
            protected set { _productWarehouseInventory = value; }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Core.Domain.Seo;
using Nop.Core.Domain.Stores;

namespace Nop.Core.Domain.Catalog
{
    /// <summary>
    /// Represents a product
    /// </summary>
    public partial class Product : BaseEntity, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported, IDiscountSupported
    {
        private ICollection<ProductCategory> _productCategories;
        private ICollection<ProductManufacturer> _productManufacturers;
        private ICollection<ProductPicture> _productPictures;
        private ICollection<ProductReview> _productReviews;
        private ICollection<ProductSpecificationAttribute> _productSpecificationAttributes;
        private ICollection<ProductProductTagMapping> _productProductTagMappings;
        private ICollection<ProductAttributeMapping> _productAttributeMappings;
        private ICollection<ProductAttributeCombination> _productAttributeCombinations;
        protected ICollection<TierPrice> _tierPrices;
        protected ICollection<DiscountProductMapping> _discountProductMappings;
        private ICollection<ProductWarehouseInventory> _productWarehouseInventory;

        /// <summary>
        /// Gets or sets the product type identifier
        /// </summary>
        public int ProductTypeId { get; set; }

        /// <summary>
        /// Gets or sets the parent product identifier. It's used to identify associated products (only with "grouped" products)
        /// </summary>
        public int ParentGroupedProductId { get; set; }

        /// <summary>
        /// Gets or sets the values indicating whether this product is visible in catalog or search results.
        /// It's used when this product is associated to some "grouped" one
        /// This way associated products could be accessed/added/etc only from a grouped product details page
        /// </summary>
        public bool VisibleIndividually { get; set; }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the short description
        /// </summary>
        public string ShortDescription { get; set; }

        /// <summary>
        /// Gets or sets the full description
        /// </summary>
        public string FullDescription { get; set; }

        /// <summary>
        /// Gets or sets the admin comment
        /// </summary>
        public string AdminComment { get; set; }

        /// <summary>
        /// Gets or sets a value of used product template identifier
        /// </summary>
        public int ProductTemplateId { get; set; }

        /// <summary>
        /// Gets or sets a vendor identifier
        /// </summary>
        public int VendorId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to show the product on home page
        /// </summary>
        public bool ShowOnHomePage { get; set; }

        /// <summary>
        /// Gets or sets the meta keywords
        /// </summary>
        public string MetaKeywords { get; set; }

        /// <summary>
        /// Gets or sets the meta description
        /// </summary>
        public string MetaDescription { get; set; }

        /// <summary>
        /// Gets or sets the meta title
        /// </summary>
        public string MetaTitle { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product allows customer reviews
        /// </summary>
        public bool AllowCustomerReviews { get; set; }

        /// <summary>
        /// Gets or sets the rating sum (approved reviews)
        /// </summary>
        public int ApprovedRatingSum { get; set; }

        /// <summary>
        /// Gets or sets the rating sum (not approved reviews)
        /// </summary>
        public int NotApprovedRatingSum { get; set; }

        /// <summary>
        /// Gets or sets the total rating votes (approved reviews)
        /// </summary>
        public int ApprovedTotalReviews { get; set; }

        /// <summary>
        /// Gets or sets the total rating votes (not approved reviews)
        /// </summary>
        public int NotApprovedTotalReviews { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is subject to ACL
        /// </summary>
        public bool SubjectToAcl { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores
        /// </summary>
        public bool LimitedToStores { get; set; }

        /// <summary>
        /// Gets or sets the SKU
        /// </summary>
        public string Sku { get; set; }

        /// <summary>
        /// Gets or sets the manufacturer part number
        /// </summary>
        public string ManufacturerPartNumber { get; set; }

        /// <summary>
        /// Gets or sets the Global Trade Item Number (GTIN). These identifiers include UPC (in North America), EAN (in Europe), JAN (in Japan), and ISBN (for books).
        /// </summary>
        public string Gtin { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is gift card
        /// </summary>
        public bool IsGiftCard { get; set; }

        /// <summary>
        /// Gets or sets the gift card type identifier
        /// </summary>
        public int GiftCardTypeId { get; set; }

        /// <summary>
        /// Gets or sets gift card amount that can be used after purchase. If not specified, then product price will be used.
        /// </summary>
        public decimal? OverriddenGiftCardAmount { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product requires that other products are added to the cart (Product X requires Product Y)
        /// </summary>
        public bool RequireOtherProducts { get; set; }

        /// <summary>
        /// Gets or sets a required product identifiers (comma separated)
        /// </summary>
        public string RequiredProductIds { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether required products are automatically added to the cart
        /// </summary>
        public bool AutomaticallyAddRequiredProducts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is download
        /// </summary>
        public bool IsDownload { get; set; }

        /// <summary>
        /// Gets or sets the download identifier
        /// </summary>
        public int DownloadId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this downloadable product can be downloaded unlimited number of times
        /// </summary>
        public bool UnlimitedDownloads { get; set; }

        /// <summary>
        /// Gets or sets the maximum number of downloads
        /// </summary>
        public int MaxNumberOfDownloads { get; set; }

        /// <summary>
        /// Gets or sets the number of days during customers keeps access to the file.
        /// </summary>
        public int? DownloadExpirationDays { get; set; }

        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public int DownloadActivationTypeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product has a sample download file
        /// </summary>
        public bool HasSampleDownload { get; set; }

        /// <summary>
        /// Gets or sets the sample download identifier
        /// </summary>
        public int SampleDownloadId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product has user agreement
        /// </summary>
        public bool HasUserAgreement { get; set; }

        /// <summary>
        /// Gets or sets the text of license agreement
        /// </summary>
        public string UserAgreementText { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is recurring
        /// </summary>
        public bool IsRecurring { get; set; }

        /// <summary>
        /// Gets or sets the cycle length
        /// </summary>
        public int RecurringCycleLength { get; set; }

        /// <summary>
        /// Gets or sets the cycle period
        /// </summary>
        public int RecurringCyclePeriodId { get; set; }

        /// <summary>
        /// Gets or sets the total cycles
        /// </summary>
        public int RecurringTotalCycles { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is rental
        /// </summary>
        public bool IsRental { get; set; }

        /// <summary>
        /// Gets or sets the rental length for some period (price for this period)
        /// </summary>
        public int RentalPriceLength { get; set; }

        /// <summary>
        /// Gets or sets the rental period (price for this period)
        /// </summary>
        public int RentalPricePeriodId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is ship enabled
        /// </summary>
        public bool IsShipEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is free shipping
        /// </summary>
        public bool IsFreeShipping { get; set; }

        /// <summary>
        /// Gets or sets a value this product should be shipped separately (each item)
        /// </summary>
        public bool ShipSeparately { get; set; }

        /// <summary>
        /// Gets or sets the additional shipping charge
        /// </summary>
        public decimal AdditionalShippingCharge { get; set; }

        /// <summary>
        /// Gets or sets a delivery date identifier
        /// </summary>
        public int DeliveryDateId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is marked as tax exempt
        /// </summary>
        public bool IsTaxExempt { get; set; }

        /// <summary>
        /// Gets or sets the tax category identifier
        /// </summary>
        public int TaxCategoryId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the product is telecommunications or broadcasting or electronic services
        /// </summary>
        public bool IsTelecommunicationsOrBroadcastingOrElectronicServices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating how to manage inventory
        /// </summary>
        public int ManageInventoryMethodId { get; set; }

        /// <summary>
        /// Gets or sets a product availability range identifier
        /// </summary>
        public int ProductAvailabilityRangeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether multiple warehouses are used for this product
        /// </summary>
        public bool UseMultipleWarehouses { get; set; }

        /// <summary>
        /// Gets or sets a warehouse identifier
        /// </summary>
        public int WarehouseId { get; set; }

        /// <summary>
        /// Gets or sets the stock quantity
        /// </summary>
        public int StockQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to display stock availability
        /// </summary>
        public bool DisplayStockAvailability { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to display stock quantity
        /// </summary>
        public bool DisplayStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets the minimum stock quantity
        /// </summary>
        public int MinStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets the low stock activity identifier
        /// </summary>
        public int LowStockActivityId { get; set; }

        /// <summary>
        /// Gets or sets the quantity when admin should be notified
        /// </summary>
        public int NotifyAdminForQuantityBelow { get; set; }

        /// <summary>
        /// Gets or sets a value backorder mode identifier
        /// </summary>
        public int BackorderModeId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to back in stock subscriptions are allowed
        /// </summary>
        public bool AllowBackInStockSubscriptions { get; set; }

        /// <summary>
        /// Gets or sets the order minimum quantity
        /// </summary>
        public int OrderMinimumQuantity { get; set; }

        /// <summary>
        /// Gets or sets the order maximum quantity
        /// </summary>
        public int OrderMaximumQuantity { get; set; }

        /// <summary>
        /// Gets or sets the comma separated list of allowed quantities. null or empty if any quantity is allowed
        /// </summary>
        public string AllowedQuantities { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether we allow adding to the cart/wishlist only attribute combinations that exist and have stock greater than zero.
        /// This option is used only when we have "manage inventory" set to "track inventory by product attributes"
        /// </summary>
        public bool AllowAddingOnlyExistingAttributeCombinations { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product is returnable (a customer is allowed to submit return request with this product)
        /// </summary>
        public bool NotReturnable { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable buy (Add to cart) button
        /// </summary>
        public bool DisableBuyButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable "Add to wishlist" button
        /// </summary>
        public bool DisableWishlistButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this item is available for Pre-Order
        /// </summary>
        public bool AvailableForPreOrder { get; set; }

        /// <summary>
        /// Gets or sets the start date and time of the product availability (for pre-order products)
        /// </summary>
        public DateTime? PreOrderAvailabilityStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to show "Call for Pricing" or "Call for quote" instead of price
        /// </summary>
        public bool CallForPrice { get; set; }

        /// <summary>
        /// Gets or sets the price
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// Gets or sets the old price
        /// </summary>
        public decimal OldPrice { get; set; }

        /// <summary>
        /// Gets or sets the product cost
        /// </summary>
        public decimal ProductCost { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether a customer enters price
        /// </summary>
        public bool CustomerEntersPrice { get; set; }

        /// <summary>
        /// Gets or sets the minimum price entered by a customer
        /// </summary>
        public decimal MinimumCustomerEnteredPrice { get; set; }

        /// <summary>
        /// Gets or sets the maximum price entered by a customer
        /// </summary>
        public decimal MaximumCustomerEnteredPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether base price (PAngV) is enabled. Used by German users.
        /// </summary>
        public bool BasepriceEnabled { get; set; }

        /// <summary>
        /// Gets or sets an amount in product for PAngV
        /// </summary>
        public decimal BasepriceAmount { get; set; }

        /// <summary>
        /// Gets or sets a unit of product for PAngV (MeasureWeight entity)
        /// </summary>
        public int BasepriceUnitId { get; set; }

        /// <summary>
        /// Gets or sets a reference amount for PAngV
        /// </summary>
        public decimal BasepriceBaseAmount { get; set; }

        /// <summary>
        /// Gets or sets a reference unit for PAngV (MeasureWeight entity)
        /// </summary>
        public int BasepriceBaseUnitId { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product is marked as new
        /// </summary>
        public bool MarkAsNew { get; set; }

        /// <summary>
        /// Gets or sets the start date and time of the new product (set product as "New" from date). Leave empty to ignore this property
        /// </summary>
        public DateTime? MarkAsNewStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the end date and time of the new product (set product as "New" to date). Leave empty to ignore this property
        /// </summary>
        public DateTime? MarkAsNewEndDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product has tier prices configured
        /// <remarks>The same as if we run this.TierPrices.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load tier prices navigation property
        /// </remarks>
        /// </summary>
        public bool HasTierPrices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this product has discounts applied
        /// <remarks>The same as if we run this.AppliedDiscounts.Count > 0
        /// We use this property for performance optimization:
        /// if this property is set to false, then we do not need to load Applied Discounts navigation property
        /// </remarks>
        /// </summary>
        public bool HasDiscountsApplied { get; set; }

        /// <summary>
        /// Gets or sets the weight
        /// </summary>
        public decimal Weight { get; set; }

        /// <summary>
        /// Gets or sets the length
        /// </summary>
        public decimal Length { get; set; }

        /// <summary>
        /// Gets or sets the width
        /// </summary>
        public decimal Width { get; set; }

        /// <summary>
        /// Gets or sets the height
        /// </summary>
        public decimal Height { get; set; }

        /// <summary>
        /// Gets or sets the available start date and time
        /// </summary>
        public DateTime? AvailableStartDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the available end date and time
        /// </summary>
        public DateTime? AvailableEndDateTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets a display order.
        /// This value is used when sorting associated products (used with "grouped" products)
        /// This value is used when sorting home page products
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is published
        /// </summary>
        public bool Published { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity has been deleted
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the date and time of product creation
        /// </summary>
        public DateTime CreatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the date and time of product update
        /// </summary>
        public DateTime UpdatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the product type
        /// </summary>
        public ProductType ProductType
        {
            get => (ProductType)ProductTypeId;
            set => ProductTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the backorder mode
        /// </summary>
        public BackorderMode BackorderMode
        {
            get => (BackorderMode)BackorderModeId;
            set => BackorderModeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the download activation type
        /// </summary>
        public DownloadActivationType DownloadActivationType
        {
            get => (DownloadActivationType)DownloadActivationTypeId;
            set => DownloadActivationTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the gift card type
        /// </summary>
        public GiftCardType GiftCardType
        {
            get => (GiftCardType)GiftCardTypeId;
            set => GiftCardTypeId = (int)value;
        }

        /// <summary>
        /// Gets or sets the low stock activity
        /// </summary>
        public LowStockActivity LowStockActivity
        {
            get => (LowStockActivity)LowStockActivityId;
            set => LowStockActivityId = (int)value;
        }

        /// <summary>
        /// Gets or sets the value indicating how to manage inventory
        /// </summary>
        public ManageInventoryMethod ManageInventoryMethod
        {
            get => (ManageInventoryMethod)ManageInventoryMethodId;
            set => ManageInventoryMethodId = (int)value;
        }

        /// <summary>
        /// Gets or sets the cycle period for recurring products
        /// </summary>
        public RecurringProductCyclePeriod RecurringCyclePeriod
        {
            get => (RecurringProductCyclePeriod)RecurringCyclePeriodId;
            set => RecurringCyclePeriodId = (int)value;
        }

        /// <summary>
        /// Gets or sets the period for rental products
        /// </summary>
        public RentalPricePeriod RentalPricePeriod
        {
            get => (RentalPricePeriod)RentalPricePeriodId;
            set => RentalPricePeriodId = (int)value;
        }

        /// <summary>
        /// Gets or sets the collection of ProductCategory
        /// </summary>
        public virtual ICollection<ProductCategory> ProductCategories
        {
            get => _productCategories ?? (_productCategories = new List<ProductCategory>());
            protected set => _productCategories = value;
        }

        /// <summary>
        /// Gets or sets the collection of ProductManufacturer
        /// </summary>
        public virtual ICollection<ProductManufacturer> ProductManufacturers
        {
            get => _productManufacturers ?? (_productManufacturers = new List<ProductManufacturer>());
            protected set => _productManufacturers = value;
        }

        /// <summary>
        /// Gets or sets the collection of ProductPicture
        /// </summary>
        public virtual ICollection<ProductPicture> ProductPictures
        {
            get => _productPictures ?? (_productPictures = new List<ProductPicture>());
            protected set => _productPictures = value;
        }

        /// <summary>
        /// Gets or sets the collection of product reviews
        /// </summary>
        public virtual ICollection<ProductReview> ProductReviews
        {
            get => _productReviews ?? (_productReviews = new List<ProductReview>());
            protected set => _productReviews = value;
        }

        /// <summary>
        /// Gets or sets the product specification attribute
        /// </summary>
        public virtual ICollection<ProductSpecificationAttribute> ProductSpecificationAttributes
        {
            get => _productSpecificationAttributes ?? (_productSpecificationAttributes = new List<ProductSpecificationAttribute>());
            protected set => _productSpecificationAttributes = value;
        }

        /// <summary>
        /// Gets or sets product-product tag mappings
        /// </summary>
        public virtual ICollection<ProductProductTagMapping> ProductProductTagMappings
        {
            get => _productProductTagMappings ?? (_productProductTagMappings = new List<ProductProductTagMapping>());
            protected set => _productProductTagMappings = value;
        }

        /// <summary>
        /// Gets or sets the product attribute mappings
        /// </summary>
        public virtual ICollection<ProductAttributeMapping> ProductAttributeMappings
        {
            get => _productAttributeMappings ?? (_productAttributeMappings = new List<ProductAttributeMapping>());
            protected set => _productAttributeMappings = value;
        }

        /// <summary>
        /// Gets or sets the product attribute combinations
        /// </summary>
        public virtual ICollection<ProductAttributeCombination> ProductAttributeCombinations
        {
            get => _productAttributeCombinations ?? (_productAttributeCombinations = new List<ProductAttributeCombination>());
            protected set => _productAttributeCombinations = value;
        }

        /// <summary>
        /// Gets or sets the tier prices
        /// </summary>
        public virtual ICollection<TierPrice> TierPrices
        {
            get => _tierPrices ?? (_tierPrices = new List<TierPrice>());
            protected set => _tierPrices = value;
        }

        /// <summary>
        /// Gets or sets the collection of applied discounts
        /// </summary>
        public IList<Discount> AppliedDiscounts => DiscountProductMappings.Select(mapping => mapping.Discount).ToList();

        /// <summary>
        /// Gets or sets the discount-product mappings
        /// </summary>
        public virtual ICollection<DiscountProductMapping> DiscountProductMappings
        {
            get => _discountProductMappings ?? (_discountProductMappings = new List<DiscountProductMapping>());
            set => _discountProductMappings = value;
        }

        /// <summary>
        /// Gets or sets the collection of "ProductWarehouseInventory" records. We use it only when "UseMultipleWarehouses" is set to "true" and ManageInventoryMethod" to "ManageStock"
        /// </summary>
        public virtual ICollection<ProductWarehouseInventory> ProductWarehouseInventory
        {
            get => _productWarehouseInventory ?? (_productWarehouseInventory = new List<ProductWarehouseInventory>());
            protected set => _productWarehouseInventory = value;
        }
    }
}

using Nop.Core.Configuration;

namespace Nop.Core.Domain.Catalog
{
    /// <summary>
    /// Product editor settings
    /// </summary>
    public class ProductEditorSettings : ISettings
    {
        /// <summary>
        /// Gets or sets a value indicating whether 'ID' field is shown
        /// </summary>
        public bool Id { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product type' field is shown
        /// </summary>
        public bool ProductType { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Visible individually' field is shown
        /// </summary>
        public bool VisibleIndividually { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product template' field is shown
        /// </summary>
        public bool ProductTemplate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Admin comment' field is shown
        /// </summary>
        public bool AdminComment { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Vendor' field is shown
        /// </summary>
        public bool Vendor { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Stores' field is shown
        /// </summary>
        public bool Stores { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'ACL' field is shown
        /// </summary>
        public bool ACL { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Show on home page' field is shown
        /// </summary>
        public bool ShowOnHomePage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Display order 'field is shown
        /// </summary>
        public bool DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Allow customer reviews' field is shown
        /// </summary>
        public bool AllowCustomerReviews { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product tags' field is shown
        /// </summary>
        public bool ProductTags { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Manufacturer part number' field is shown
        /// </summary>
        public bool ManufacturerPartNumber { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'GTIN' field is shown
        /// </summary>
        public bool GTIN { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product cost' field is shown
        /// </summary>
        public bool ProductCost { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Tier prices' field is shown
        /// </summary>
        public bool TierPrices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Discounts' field is shown
        /// </summary>
        public bool Discounts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Disable buy button' field is shown
        /// </summary>
        public bool DisableBuyButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Disable wishlist button' field is shown
        /// </summary>
        public bool DisableWishlistButton { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Available for pre-order' field is shown
        /// </summary>
        public bool AvailableForPreOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Call for price' field is shown
        /// </summary>
        public bool CallForPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Old price' field is shown
        /// </summary>
        public bool OldPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Customer enters price' field is shown
        /// </summary>
        public bool CustomerEntersPrice { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'PAngV' field is shown
        /// </summary>
        public bool PAngV { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Require other products added to the cart' field is shown
        /// </summary>
        public bool RequireOtherProductsAddedToTheCart { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Is gift card' field is shown
        /// </summary>
        public bool IsGiftCard { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Downloadable product' field is shown
        /// </summary>
        public bool DownloadableProduct { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Recurring product' field is shown
        /// </summary>
        public bool RecurringProduct { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Is rental' field is shown
        /// </summary>
        public bool IsRental { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Free shipping' field is shown
        /// </summary>
        public bool FreeShipping { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Ship separately' field is shown
        /// </summary>
        public bool ShipSeparately { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Additional shipping charge' field is shown
        /// </summary>
        public bool AdditionalShippingCharge { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Delivery date' field is shown
        /// </summary>
        public bool DeliveryDate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Telecommunications, broadcasting and electronic services' field is shown
        /// </summary>
        public bool TelecommunicationsBroadcastingElectronicServices { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product availability range' field is shown
        /// </summary>
        public bool ProductAvailabilityRange { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Use multiple warehouses' field is shown
        /// </summary>
        public bool UseMultipleWarehouses { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Warehouse' field is shown
        /// </summary>
        public bool Warehouse { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Display stock availability' field is shown
        /// </summary>
        public bool DisplayStockAvailability { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Display stock quantity' field is shown
        /// </summary>
        public bool DisplayStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Minimum stock quantity' field is shown
        /// </summary>
        public bool MinimumStockQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Low stock activity' field is shown
        /// </summary>
        public bool LowStockActivity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Notify admin for quantity below' field is shown
        /// </summary>
        public bool NotifyAdminForQuantityBelow { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Backorders' field is shown
        /// </summary>
        public bool Backorders { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Allow back in stock subscriptions' field is shown
        /// </summary>
        public bool AllowBackInStockSubscriptions { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Minimum cart quantity' field is shown
        /// </summary>
        public bool MinimumCartQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Maximum cart quantity' field is shown
        /// </summary>
        public bool MaximumCartQuantity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Allowed quantities' field is shown
        /// </summary>
        public bool AllowedQuantities { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Allow only existing attribute combinations' field is shown
        /// </summary>
        public bool AllowAddingOnlyExistingAttributeCombinations { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Not returnable' field is shown
        /// </summary>
        public bool NotReturnable { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Weight' field is shown
        /// </summary>
        public bool Weight { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Dimension' fields (height, length, width) are shown
        /// </summary>
        public bool Dimensions { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Available start date' field is shown
        /// </summary>
        public bool AvailableStartDate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Available end date' field is shown
        /// </summary>
        public bool AvailableEndDate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Mark as new' field is shown
        /// </summary>
        public bool MarkAsNew { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Mark as new. Start date' field is shown
        /// </summary>
        public bool MarkAsNewStartDate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Mark as new. End date' field is shown
        /// </summary>
        public bool MarkAsNewEndDate { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Published' field is shown
        /// </summary>
        public bool Published { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Created on' field is shown
        /// </summary>
        public bool CreatedOn { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Updated on' field is shown
        /// </summary>
        public bool UpdatedOn { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Related products' block is shown
        /// </summary>
        public bool RelatedProducts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Cross-sells products' block is shown
        /// </summary>
        public bool CrossSellsProducts { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'SEO' tab is shown
        /// </summary>
        public bool Seo { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Purchased with orders' tab is shown
        /// </summary>
        public bool PurchasedWithOrders { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether one column is used on the product details page
        /// </summary>
        public bool OneColumnProductPage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Product attributes' tab is shown
        /// </summary>
        public bool ProductAttributes { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Specification attributes' tab is shown
        /// </summary>
        public bool SpecificationAttributes { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Manufacturers' field is shown
        /// </summary>
        public bool Manufacturers { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether 'Stock quantity history' tab is shown
        /// </summary>
        public bool StockQuantityHistory { get; set; }
    }
}

/*  Company :       Nequeo Pty Ltd, http://www.nequeo.com.au/
 *  Copyright :     Copyright © Nequeo Pty Ltd 2015 http://www.nequeo.com.au/
 * 
 *  File :          
 *  Purpose :       
 * 
 */

#region Nequeo Pty Ltd License
/*
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nequeo.Net.Maps.Google
{
    /// <summary>
    /// Geocoding model.
    /// </summary>
    public class Geocoding
    {
        /// <summary>
        /// Gets or sets the status.
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// Gets or sets the results array.
        /// </summary>
        public GeocodingResult[] Results { get; set; }

        /// <summary>
        /// Gets or sets the error message.
        /// </summary>
        public string Error_Message { get; set; }
    }

    /// <summary>
    /// Geocoding result model.
    /// </summary>
    public class GeocodingResult
    {
        /// <summary>
        /// Gets or sets the address component array.
        /// </summary>
        public AddressComponent[] Address_Components { get; set; }

        /// <summary>
        /// Gets or sets the formatted address.
        /// </summary>
        public string Formatted_Address { get; set; }

        /// <summary>
        /// Gets or sets the geometry.
        /// </summary>
        public Geometry Geometry { get; set; }

        /// <summary>
        /// Gets or sets the place ID.
        /// </summary>
        public string Place_Id { get; set; }

        /// <summary>
        /// Gets or sets the address type array.
        /// </summary>
        public string[] Types { get; set; }
    }

    /// <summary>
    /// Address component.
    /// </summary>
    public class AddressComponent
    {
        /// <summary>
        /// Gets or sets the long name.
        /// </summary>
        public string Long_Name { get; set; }

        /// <summary>
        /// Gets or sets the short name.
        /// </summary>
        public string Short_Name { get; set; }

        /// <summary>
        /// Gets or sets the address type array.
        /// </summary>
        public string[] Types { get; set; }
    }

    /// <summary>
    /// Geometry model.
    /// </summary>
    public class Geometry
    {
        /// <summary>
        /// Gets or sets the location.
        /// </summary>
        public Location Location { get; set; }

        /// <summary>
        /// Gets or sets the location type.
        /// </summary>
        public string Location_Type { get; set; }

        /// <summary>
        /// Gets or sets the view port.
        /// </summary>
        public Viewport Viewport { get; set; }
    }

    /// <summary>
    /// Location model.
    /// </summary>
    public class Location
    {
        /// <summary>
        /// Gets or sets the latitude.
        /// </summary>
        public string Lat { get; set; }

        /// <summary>
        /// Gets or sets the longitude.
        /// </summary>
        public string Lng { get; set; }
    }

    /// <summary>
    /// Viewport model.
    /// </summary>
    public class Viewport
    {
        /// <summary>
        /// Gets or sets the morth east location.
        /// </summary>
        public Location NorthEast { get; set; }

        /// <summary>
        /// Gets or sets the south west location.
        /// </summary>
        public Location SouthWest { get; set; }
    }
}

Microsoft.Quantum.Bitwise.Or : IApplyData, ICallable

Constructors :

public Or(IOperationFactory m = )

Methods :

public Func<ValueTuple<Int64Int64>, Int64> get___Body__()
public Void __Init__()
public IApplyData __DataIn__(ValueTuple<Int64Int64> data = )
public IApplyData __DataOut__(Int64 data = )
public static Task<Int64> Run(IOperationFactory __m__ = , Int64 a = , Int64 b = )
public Int64 Apply(ValueTuple<Int64Int64> a = )
public T Partial(Object partialInfo = )
public FunctionPartial<P, ValueTuple<Int64Int64>, Int64> Partial(Func<P, ValueTuple<Int64Int64>> mapper = )
public GenO Apply(Object args = )
public String ToString()
public String __qsharpType()
public IOperationFactory get___Factory__()
public RuntimeMetadata GetRuntimeMetadata(IApplyData args = )
public Type GetType()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Other methods