<commit_before>// Copyright (C) Pash Contributors. License: GPL/BSD. See https://github.com/Pash-Project/Pash/

//classtodo: Needs full implementation (consistuant on runtime advances)

using System;

namespace System.Management.Automation
{
    /// <summary>
    /// Represents an alias to a property.
    /// </summary>
    public class PSAliasProperty : PSPropertyInfo
    {
        public PSAliasProperty(string name, string referencedMemberName)
        {
            base.Name = name;
            ReferencedMemberName = referencedMemberName;
        }

        public PSAliasProperty(string name, string referencedMemberName, Type conversionType)
        {
            base.Name = name;
            ReferencedMemberName = referencedMemberName;
            ConversionType = conversionType;
        }

        //todo: implement
        public override PSMemberInfo Copy()
        {
            return null;
        }

        public override string ToString()
        {
            if (ConversionType != null)
                return (base.Name + " (" + ConversionType + ") = " + ReferencedMemberName);

            return (base.Name + " = " + ReferencedMemberName);
        }

        public Type ConversionType { get; private set; }

        private bool isgettable;
        public override bool IsGettable
        {
            get
            {
                return isgettable;
            }
        }


        private bool issettable;
        public override bool IsSettable
        {
            get
            {
                return issettable;
            }
        }

        public override PSMemberTypes MemberType
        {
            get
            {
                return PSMemberTypes.AliasProperty;
            }
        }

        public string ReferencedMemberName { get; private set; }

        public override string TypeNameOfValue
        {
            get
            {
                return ConversionType.FullName ?? "Null";
            }
        }

        public override object Value { get; set; }
    }
}
<commit_msg>Make PSAliasProperty.Is Get/Setable throw an expection instead of return a default value<commit_after>// Copyright (C) Pash Contributors. License: GPL/BSD. See https://github.com/Pash-Project/Pash/

//classtodo: Needs full implementation (consistuant on runtime advances)

using System;

namespace System.Management.Automation
{
    /// <summary>
    /// Represents an alias to a property.
    /// </summary>
    public class PSAliasProperty : PSPropertyInfo
    {
        public PSAliasProperty(string name, string referencedMemberName)
        {
            base.Name = name;
            ReferencedMemberName = referencedMemberName;
        }

        public PSAliasProperty(string name, string referencedMemberName, Type conversionType)
        {
            base.Name = name;
            ReferencedMemberName = referencedMemberName;
            ConversionType = conversionType;
        }

        //todo: implement
        public override PSMemberInfo Copy()
        {
            return null;
        }

        public override string ToString()
        {
            if (ConversionType != null)
                return (base.Name + " (" + ConversionType + ") = " + ReferencedMemberName);

            return (base.Name + " = " + ReferencedMemberName);
        }

        public Type ConversionType { get; private set; }

        public override bool IsGettable
        {
            get
            {
                throw new NotImplementedException();
            }
        }


        public override bool IsSettable
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public override PSMemberTypes MemberType
        {
            get
            {
                return PSMemberTypes.AliasProperty;
            }
        }

        public string ReferencedMemberName { get; private set; }

        public override string TypeNameOfValue
        {
            get
            {
                return ConversionType.FullName ?? "Null";
            }
        }

        public override object Value { get; set; }
    }
}

{'fraction_non_alphanumeric': 0.07302426134998799, 'fraction_numerical': 0.0, 'mean_word_length': 1.5390243902439025, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '2137590', 'n_tokens_mistral': 1056, 'n_tokens_neox': 1000, 'n_words': 267}