コード例 #1
0
        public BackendResponse TryCreateAsset(AssetBase asset)
        {
            BackendResponse ret;

            m_assetProvider.CreateAsset(asset);
            ret = BackendResponse.Success;

            m_server.MetricsProvider.LogAssetCreate(EXTENSION_NAME, ret, asset.FullID, asset.Data.Length, DateTime.Now);
            return(ret);
        }
コード例 #2
0
        public override byte[] Handle(string path, Stream request,
                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            string param = GetParam(path);

            UUID assetId;

            if (param.Length > 0)
            {
                UUID.TryParse(param, out assetId);
            }
            // byte[] txBuffer = new byte[4096];

            XmlSerializer xs    = new XmlSerializer(typeof(AssetBase));
            AssetBase     asset = (AssetBase)xs.Deserialize(request);

            m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
            m_assetProvider.CreateAsset(asset);

            return(new byte[] {});
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: boodie/Opensim2
 protected void StoreAsset(AssetBase asset)
 {
     m_assetProvider.CreateAsset(asset);
 }