Rhino.IdScriptableObject.PrototypeValues.InitValue C# (CSharp) Method

InitValue() private method

private InitValue ( int id, string name, object value, int attributes ) : void
id int
name string
value object
attributes int
return void
			internal void InitValue(int id, string name, object value, int attributes)
			{
				if (!(1 <= id && id <= maxId))
				{
					throw new ArgumentException();
				}
				if (name == null)
				{
					throw new ArgumentException();
				}
				if (value == ScriptableConstants.NOT_FOUND)
				{
					throw new ArgumentException();
				}
				ScriptableObject.CheckValidAttributes(attributes);
				if (obj.FindPrototypeId(name) != id)
				{
					throw new ArgumentException(name);
				}
				if (id == constructorId)
				{
					if (!(value is IdFunctionObject))
					{
						throw new ArgumentException("consructor should be initialized with IdFunctionObject");
					}
					constructor = (IdFunctionObject)value;
					constructorAttrs = (short)attributes;
					return;
				}
				InitSlot(id, name, value, attributes);
			}