<commit_before>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StartUpInfoProvider.cs" company="Catel development team">
//   Copyright (c) 2008 - 2013 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Catel.MVVM.Services
{
#if NET
    using System.Diagnostics;

    using Catel.Windows;

#endif
#if SILVERLIGHT
    using System.Collections.Generic;

    using System.Windows;
#endif

    /// <summary>
    /// 
    /// </summary>
    public class StartUpInfoProvider : IStartUpInfoProvider
    {
#if NET
        /// <summary>
        /// The command argument list.
        /// </summary>
        private string[] _arguments;
#endif

        #region IStartUpInfoProvider Members
#if NET
        /// <summary>
        /// Gets the application command line argument.
        /// </summary>
        public string[] Arguments
        {
            get { return _arguments ?? (_arguments = CommandLineHelper.Parse(Process.GetCurrentProcess().StartInfo.Arguments)); }
        }
#endif

#if SILVERLIGHT
        /// <summary>
        /// Gets the silverlight application initialization parameters.
        /// </summary>
        public IDictionary<string, string> InitParms
        {
            get { return Application.Current.Host.InitParams; }
        }
#endif
        #endregion
    }
}<commit_msg>(x) CTL-275 Fixed implementation of StartUpInfoProvider Arguments property<commit_after>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StartUpInfoProvider.cs" company="Catel development team">
//   Copyright (c) 2008 - 2013 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Catel.MVVM.Services
{
#if SILVERLIGHT
    using System.Collections.Generic;

    using System.Windows;
#endif

    /// <summary>
    /// 
    /// </summary>
    public class StartUpInfoProvider : IStartUpInfoProvider
    {
#if NET
        /// <summary>
        /// The command argument list.
        /// </summary>
        private string[] _arguments;
#endif

        #region IStartUpInfoProvider Members
#if NET
        /// <summary>
        /// Gets the application command line argument.
        /// </summary>
        public string[] Arguments
        {
            get
            {
        	    if (_arguments == null)
        	    {
        	        var commandLine = System.Environment.GetCommandLineArgs();

                    _arguments = new string[commandLine.Length - 1];

                    if (_arguments.Length > 0)
        	        {
                        System.Array.Copy(commandLine, 1, _arguments, 0, _arguments.Length);
        	        }
        	    }
        	
                return _arguments;
            }
        }
#endif

#if SL4 || SL5
        /// <summary>
        /// Gets the silverlight application initialization parameters.
        /// </summary>
        public IDictionary<string, string> InitParms
        {
            get { return Application.Current.Host.InitParams; }
        }
#endif
        #endregion
    }
}
{'fraction_non_alphanumeric': 0.23183289202706678, 'fraction_numerical': 0.0073551044424830835, 'mean_word_length': 1.2383146807109942, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6744460', 'n_tokens_mistral': 809, 'n_tokens_neox': 769, 'n_words': 201}