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;
 }
 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
        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;
            }
        }