public IAttributeSetState Get(string id)
        {
            IAttributeSetState state = CurrentSession.Get <AttributeSetState> (id);

            if (state == null)
            {
                state = new AttributeSetState();
                (state as AttributeSetState).AttributeSetId = id;
            }
            return(state);
        }
Exemplo n.º 2
0
        public static IEnumerable <IAttributeSetState> ToAttributeSetStateCollection(IEnumerable <string> ids)
        {
            var states = new List <AttributeSetState>();

            foreach (var id in ids)
            {
                var s = new AttributeSetState();
                s.AttributeSetId = id;
                states.Add(s);
            }
            return(states);
        }
Exemplo n.º 3
0
        public IAttributeSetState Get(string id, bool nullAllowed)
        {
            IAttributeSetState state = CurrentSession.Get <AttributeSetState> (id);

            if (!nullAllowed && state == null)
            {
                state = new AttributeSetState();
                (state as AttributeSetState).AttributeSetId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IAttributeSetState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames));
            }
            return(state);
        }