Пример #1
0
        public static RestrictionDefinition Create(string type, ActorDefinition actor)
        {
            RestrictionType parsedType;
            Enum.TryParse(type, true, out parsedType);

            return new RestrictionDefinition() { Actor = actor, Type = parsedType };
        }
Пример #2
0
		public static RestrictionDefinition Create(RestrictionType type, ActorDefinition actor)
		{
			return new RestrictionDefinition()
			{
				Actor = actor,
				Type = type
			};
		}
Пример #3
0
		public static ActorDefinition Create(string name, string rule, string value)
		{
			ActorDefinition actorDefinition = new ActorDefinition()
			{
				Name = name,
				Rule = rule,
				Value = value
			};
			return actorDefinition;
		}
Пример #4
0
        public static RestrictionDefinition Create(string type, ActorDefinition actor)
        {
            RestrictionType parsedType;

            Enum.TryParse(type, true, out parsedType);

            return(new RestrictionDefinition()
            {
                Actor = actor, Type = parsedType
            });
        }