コード例 #1
0
 public PropertyDefinition(IClass @class, string propertyName, bool isLegal, bool isEnabled, IFactory factory)
 {
     Attributes = new List <AttributeProxy>();
     Class      = @class;
     Name       = new IdentifierName(propertyName);
     IsLegal    = isLegal;
     IsEnabled  = isEnabled;
     _factory   = factory;
 }
コード例 #2
0
 public PropertyDefinition(IClass @class, string propertyName, bool isLegal, bool isEnabled, IFactory factory)
 {
     Attributes = new List<AttributeProxy>();
     Class = @class;
     Name = new IdentifierName(propertyName);
     IsLegal = isLegal;
     IsEnabled = isEnabled;
     _factory = factory;
 }
コード例 #3
0
ファイル: DomPath.cs プロジェクト: sethkontny/CSharpinator
        public DomPath(string fullPath, int typeNameDepth)
        {
            if (fullPath == null)
            {
                throw new NullReferenceException("fullPath");
            }

            _fullPath = fullPath;
            _typeNameDepth = typeNameDepth;

            var pathElements = fullPath.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries).Reverse().ToList();

            _typeName = new IdentifierName(string.Join("_", pathElements.Take(typeNameDepth + 1).Reverse()));
            _elementName = new IdentifierName(pathElements.First());

            unchecked
            {
                _hashCode = (fullPath.GetHashCode() * 397) ^ typeNameDepth;
            }
        }
コード例 #4
0
        public DomPath(string fullPath, int typeNameDepth)
        {
            if (fullPath == null)
            {
                throw new NullReferenceException("fullPath");
            }

            _fullPath      = fullPath;
            _typeNameDepth = typeNameDepth;

            var pathElements = fullPath.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries).Reverse().ToList();

            _typeName    = new IdentifierName(string.Join("_", pathElements.Take(typeNameDepth + 1).Reverse()));
            _elementName = new IdentifierName(pathElements.First());

            unchecked
            {
                _hashCode = (fullPath.GetHashCode() * 397) ^ typeNameDepth;
            }
        }